Amortized Noise Terrain Generator
A Program to Generate Terrain from Amortized Noise with Exponentially Distributed Gradient Magnitude
|
Header for generating an exponentially distributed hash function. More...
Go to the source code of this file.
Functions | |
float | UniformHash (unsigned int x, unsigned int max) |
Uniformly distributed hash function. More... | |
float | ExpHash (unsigned int x, unsigned int max) |
Exponentially distributed hash function. More... | |
float | ExpHash (unsigned int x, unsigned int y, unsigned int m, float omega) |
Exponentially distributed hash function. More... | |
float ExpHash | ( | unsigned int | x, |
unsigned int | max | ||
) |
Exponentially distributed hash function.
Hash an unsigned integer into the range (0, 1) with an exponential distribution.
x | Value to be hashed. |
max | Largest possible value of x. |
float ExpHash | ( | unsigned int | x, |
unsigned int | y, | ||
unsigned int | m, | ||
float | omega | ||
) |
Exponentially distributed hash function.
Hash an unsigned integer into the range (0, 1) with an exponential distribution giving some control over the base of the exponent and the height of the tail of the distribution.
x | Value to be hashed. |
y | Second value to be hashed to select distribution. |
m | Largest possible value of x. |
omega | The tail multiplier, which controls how low the tails of the distribution can be. |
float UniformHash | ( | unsigned int | x, |
unsigned int | max | ||
) |
Uniformly distributed hash function.
Hash an unsigned integer uniformly into the range (0, 1).
x | Value to be hashed. |
max | Largest possible value of x. |