|
procedurals
Procedural generation building blocks
|
#include <cstdint>

Go to the source code of this file.
Functions | |
| uint64_t | mix64 (uint64_t x) noexcept |
| float | normaliseHash (uint64_t x) noexcept |
| float | random0D (uint64_t seed=0) noexcept |
| float | random1D (int x, uint64_t seed=0) noexcept |
| float | random2D (int x, int y, uint64_t seed=0) noexcept |
| float | random3D (int x, int y, int z, uint64_t seed=0) noexcept |
| float | random4D (int x, int y, int z, int w, uint64_t seed=0) noexcept |
| uint64_t | SplitSeed (uint64_t seed, uint64_t channel) noexcept |
Variables | |
| constexpr double | PHI = 1.6180339887498949 |
| phi, inv_phi, golden_ratio | |
| constexpr double | INV_PHI = 1.0 / PHI |
| constexpr uint64_t | UINT64_MAX_CONST = ~0ULL |
| constexpr double | DOUBLE_MAX = static_cast<double>(UINT64_MAX_CONST) |
| constexpr uint64_t | GOLDEN_64 = static_cast<uint64_t>(INV_PHI * DOUBLE_MAX) |
| constexpr uint64_t | MAGIC1 = GOLDEN_64 ^ 0xAAAAAAAAAAAAAAAAULL |
| Magic Multipliers. | |
| constexpr uint64_t | MAGIC2 = GOLDEN_64 ^ 0x5555555555555555ULL |
| constexpr uint64_t | MAGIC3 = GOLDEN_64 ^ 0x3333333333333333ULL |
| constexpr uint64_t | MAGIC4 = GOLDEN_64 ^ 0xCCCCCCCCCCCCCCCCULL |