public static int intValueNoise3D ( int x , int y , int z , int seed ) { // All constants are primes and must remain prime in order for this noise // function to work correctly. int n = ( X_NOISE_GEN * x + Y_NOISE_GEN * y + Z_NOISE_GEN * z + SEED_NOISE_GEN * seed ) & 0x7fffffff ; n = ( n >> 13 ) ^ n ; return ( n * ( n * n * 60493 + 19990303 ) + 1376312589 ) & 0x7fffffff ; }
Generates an integer - noise value from the coordinates of a three - dimensional input value .