Random gradient generator function in Perlin noise: What algorithm is this?
This is a random gradient generator function for Perlin Noise. The full implementation can be found here. I have little knowledge about RNGs, but the underlying algorithm doesn’t seem to be linear congruential. What algorithm is this? I tried modifying these magic numbers (except for -1.0 and 2.0 I know they’re used to map the result to [-1, 1]) without breaking this function, but I don’t know if it’s always safe to do so.
algorithm – Random gradient generator function in Perlin noise: What algorithm is this?
This is a random gradient generator function for Perlin Noise. The full implementation can be found here. I have little knowledge about RNGs, but the underlying algorithm doesn’t seem to be linear congruential. What algorithm is this? I tried modifying these magic numbers (except for -1.0 and 2.0 I know they’re used to map the result to [-1, 1]) without breaking this function, but I don’t know if it’s always safe to do so.