HighMap library (C++)
Loading...
Searching...
No Matches
random.hpp File Reference

Go to the source code of this file.

Classes

class  hmap::PdfSampler
 Samples indices from a discrete probability distribution. More...

Namespaces

namespace  hmap

Functions

float hmap::fast_hash32_to_unit_float (unsigned int seed, size_t k)
 Generates a fast deterministic uniform float in [0,1) using a 32-bit hash.
float hmap::hash01 (uint32_t a, uint32_t b)
 Computes a pseudo-random float in [0, 1) by hashing two 32-bit integers.
uint32_t hmap::hash32 (uint32_t x)
 Integer hash function (Murmur3 / finalize style 32-bit mixer).
uint64_t hmap::splitmix64 (uint64_t x)
 Computes a deterministic 64-bit hash using the SplitMix64 algorithm.
float hmap::splitmix64_to_unit_float (unsigned int seed, size_t k)
 Generates a deterministic uniform float in [0,1) from a seed and sample index.
float hmap::uniform01 (uint64_t h)
 Converts a 64-bit hash value into a deterministic uniform float in [0, 1).
float hmap::vnoise (float x, float y, uint32_t seed=0)
 Computes 2D value noise in [-1, 1] using a hash-based lattice.