blob: 7a9a9780105f17ddd3762a67c2f6f3d53877128b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#ifndef PERLINNOISE_H
#define PERLINNOISE_H
class PerlinNoise {
public:
static float Noise(float x, float y);
// Returns noise between 0 - 1
inline static float NoiseNormalized(float x, float y)
{
//-0.697 - 0.795 + 0.697
float value = Noise(x, y);
value = (value + 0.69F) / (0.793F + 0.69F);
return value;
}
};
#endif
|