/** * Generates a value-noise value from the coordinates of a three-dimensional input value. * * @param x The @a x coordinate of the input value. * @param y The @a y coordinate of the input value. * @param z The @a z coordinate of the input value. * @param seed A random number seed. * @return The generated value-noise value. * <p/> * The return value ranges from -1.0 to +1.0. * <p/> * A noise function differs from a random-number generator because it always returns the same output value if the same input value is passed to it. */ public static double valueNoise3D(int x, int y, int z, int seed) { return 1.0 - (intValueNoise3D(x, y, z, seed) / 1073741824.0); } }
/** * Generates a value-noise value from the coordinates of a three-dimensional input value. * * @param x The @a x coordinate of the input value. * @param y The @a y coordinate of the input value. * @param z The @a z coordinate of the input value. * @param seed A random number seed. * @return The generated value-noise value. * <p/> * The return value ranges from 0 to 1. * <p/> * A noise function differs from a random-number generator because it always returns the same output value if the same input value is passed to it. */ public static double valueNoise3D(int x, int y, int z, int seed) { return intValueNoise3D(x, y, z, seed) / 2147483647.0; } }
/** * Generates a value-noise value from the coordinates of a three-dimensional input value. * * @param x The @a x coordinate of the input value. * @param y The @a y coordinate of the input value. * @param z The @a z coordinate of the input value. * @param seed A random number seed. * @return The generated value-noise value. * <p/> * The return value ranges from 0 to 1. * <p/> * A noise function differs from a random-number generator because it always returns the same output value if the same input value is passed to it. */ public static double valueNoise3D(int x, int y, int z, int seed) { return intValueNoise3D(x, y, z, seed) / 2147483647.0; } }