Package squidpony.squidmath
Class Noise.QuilezNoise
java.lang.Object
squidpony.squidmath.Noise.QuilezNoise
- All Implemented Interfaces:
Noise.Noise1D
,Noise.Noise2D
- Enclosing class:
- Noise
public static class Noise.QuilezNoise extends Object implements Noise.Noise1D, Noise.Noise2D
A hybrid between value and gradient noise that may be faster for 1D noise. Every integer value of x given to this
will produce a result of 0. This only hashes one coordinate per noise call, unlike most value noise that needs 2
hashes in 1D and many more in higher dimensions. Based on Inigo
Quilez' "Basic Noise".
-
Field Summary
Fields Modifier and Type Field Description long
seed
-
Constructor Summary
Constructors Constructor Description QuilezNoise()
QuilezNoise(long seed)
-
Method Summary
Modifier and Type Method Description double
getNoise(double x)
double
getNoise(double x, double y)
double
getNoiseWithSeed(double x, double y, long seed)
double
getNoiseWithSeed(double x, long seed)
-
Field Details
-
Constructor Details
-
QuilezNoise
public QuilezNoise() -
QuilezNoise
-
-
Method Details
-
getNoise
- Specified by:
getNoise
in interfaceNoise.Noise1D
-
getNoiseWithSeed
- Specified by:
getNoiseWithSeed
in interfaceNoise.Noise1D
-
getNoise
- Specified by:
getNoise
in interfaceNoise.Noise2D
-
getNoiseWithSeed
- Specified by:
getNoiseWithSeed
in interfaceNoise.Noise2D
-