From 7abaede2457e494290882d9795873aab2309da65 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sat, 2 Jun 2012 12:19:20 +0000 Subject: Added the Biomal height generator, made it the default height generator. git-svn-id: http://mc-server.googlecode.com/svn/trunk@536 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cNoise.inc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/cNoise.inc') 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] } -- cgit v1.2.3