darts/sampling.h file

Random sampling on various domains.

Global RNG and rejection sampling

auto randf() -> float
Global random number generator that produces floats between [0,1)
auto random_in_unit_sphere() -> Vec3f
Sample a random point uniformly within a unit sphere (uses the global randf() RNG and rejection sampling)
auto random_in_unit_disk() -> Vec2f
Sample a random point uniformly within a unit disk (uses the global randf() RNG and rejection sampling)
auto hash2d(int x, int y) -> uint32_t
Hash two integer coordinates (e.g. pixel coordinates) into a pseudo-random unsigned int.