summaryrefslogtreecommitdiffstats
path: root/source/cNoise.inc
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-06-02 14:19:20 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-06-02 14:19:20 +0200
commit7abaede2457e494290882d9795873aab2309da65 (patch)
tree80542428c66d74fd6fc7c23d55c35a9666e92012 /source/cNoise.inc
parentCore: fixed old API (diff)
downloadcuberite-7abaede2457e494290882d9795873aab2309da65.tar
cuberite-7abaede2457e494290882d9795873aab2309da65.tar.gz
cuberite-7abaede2457e494290882d9795873aab2309da65.tar.bz2
cuberite-7abaede2457e494290882d9795873aab2309da65.tar.lz
cuberite-7abaede2457e494290882d9795873aab2309da65.tar.xz
cuberite-7abaede2457e494290882d9795873aab2309da65.tar.zst
cuberite-7abaede2457e494290882d9795873aab2309da65.zip
Diffstat (limited to '')
-rw-r--r--source/cNoise.inc3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/cNoise.inc b/source/cNoise.inc
index cde1f1609..e80c1f268 100644
--- a/source/cNoise.inc
+++ b/source/cNoise.inc
@@ -16,6 +16,7 @@ float cNoise::IntNoise( int a_X ) const
{
int x = ((a_X*m_Seed)<<13) ^ a_X;
return ( 1.0f - ( (x * (x * x * 15731 + 789221) + 1376312589) & 0x7fffffff) / 1073741824.0f);
+ // returns a float number in the range of [-1, 1]
}
@@ -27,6 +28,7 @@ float cNoise::IntNoise2D( int a_X, int a_Y ) const
int n = a_X + a_Y * 57 + m_Seed*57*57;
n = (n<<13) ^ n;
return ( 1.0f - ( (n * (n * n * 15731 + 789221) + 1376312589) & 0x7fffffff) / 1073741824.0f);
+ // returns a float number in the range of [-1, 1]
}
@@ -38,6 +40,7 @@ float cNoise::IntNoise3D( int a_X, int a_Y, int a_Z ) const
int n = a_X + a_Y * 57 + a_Z * 57*57 + m_Seed*57*57*57;
n = (n<<13) ^ n;
return ( 1.0f - ( (n * (n * n * 15731 + 789221) + 1376312589) & 0x7fffffff) / 1073741824.0f);
+ // returns a float number in the range of [-1, 1]
}