|
libft
|
General-purpose utility functions. More...
#include "libft.h"
Include dependency graph for ft_utils.c:Functions | |
| int | ft_rand (int min, int max) |
| Returns a random integer in the range [min, max] using xorshift32. | |
| void | ft_swap (void *a, void *b, size_t size) |
| Swaps the contents of two memory blocks. | |
| static unsigned int | xorshift32 (unsigned int *state) |
| Performs a 32-bit xorshift operation to generate a pseudo-random number. | |
General-purpose utility functions.
This file contains reusable helpers such as ft_swap for memory-safe value swapping, and ft_rand for pseudo-random integer generation using the xorshift32 algorithm.