mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
use double precision numbers in love.math.noise
This commit is contained in:
@@ -132,12 +132,12 @@ private:
|
||||
}; // Math
|
||||
|
||||
|
||||
static inline float noise1(float x)
|
||||
static inline float noise1(double x)
|
||||
{
|
||||
return SimplexNoise1234::noise(x) * 0.5f + 0.5f;
|
||||
}
|
||||
|
||||
static inline float noise2(float x, float y)
|
||||
static inline float noise2(double x, double y)
|
||||
{
|
||||
return SimplexNoise1234::noise(x, y) * 0.5f + 0.5f;
|
||||
}
|
||||
@@ -145,12 +145,12 @@ static inline float noise2(float x, float y)
|
||||
// Perlin noise is used instead of Simplex noise in the 3D and 4D cases to avoid
|
||||
// patent issues.
|
||||
|
||||
static inline float noise3(float x, float y, float z)
|
||||
static inline float noise3(double x, double y, double z)
|
||||
{
|
||||
return Noise1234::noise(x, y, z) * 0.5f + 0.5f;
|
||||
}
|
||||
|
||||
static inline float noise4(float x, float y, float z, float w)
|
||||
static inline float noise4(double x, double y, double z, double w)
|
||||
{
|
||||
return Noise1234::noise(x, y, z, w) * 0.5f + 0.5f;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user