double C3DPerlinNoise::generateNoise1D(double x) { x *= _frequency; int ix = (int)x; double s = x - ix; ix += _seed; double r1 = noise1d(ix); double r2 = noise1d(ix + 1); return interpolate(r1, r2, s) * _factorScale + _factorAdd; }
float noise3d(uint x, uint y, uint z) { return noise1d(x + y * 67 + z * 101); }
float noise2d(uint x, uint y) { return noise1d(x + y * 71); }
static inline double noise2d(int x, int y) { int n = x + y * 57; return noise1d(n); }