Shared methods for generating noise
Procs
proc buildPermutations(seed: uint32): array[0 .. 511, int] {....raises: [], tags: [].}
- Returns a hash lookup table. It is all the numbers from 0 to 255 (inclusive) in a randomly sorted array, twice over
proc grad(hash: int; x, y, z: float): float {.inline, ...raises: [], tags: [].}
- Calculate the dot product of a randomly selected gradient vector and the 8 location vectors