diff options
author | Chris Darnell <chris@cedeel.com> | 2014-09-22 09:22:36 +0200 |
---|---|---|
committer | Chris Darnell <chris@cedeel.com> | 2014-09-22 09:22:36 +0200 |
commit | 195b646aa4189ec9858f4994754eadd2c05ef9df (patch) | |
tree | e39037971290a1b9fa6343c0c8f846541096d435 /src/Generating/Noise3DGenerator.cpp | |
parent | QtBiomeVisualiser: Added the base for INI editting. (diff) | |
download | cuberite-195b646aa4189ec9858f4994754eadd2c05ef9df.tar cuberite-195b646aa4189ec9858f4994754eadd2c05ef9df.tar.gz cuberite-195b646aa4189ec9858f4994754eadd2c05ef9df.tar.bz2 cuberite-195b646aa4189ec9858f4994754eadd2c05ef9df.tar.lz cuberite-195b646aa4189ec9858f4994754eadd2c05ef9df.tar.xz cuberite-195b646aa4189ec9858f4994754eadd2c05ef9df.tar.zst cuberite-195b646aa4189ec9858f4994754eadd2c05ef9df.zip |
Diffstat (limited to 'src/Generating/Noise3DGenerator.cpp')
-rw-r--r-- | src/Generating/Noise3DGenerator.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Generating/Noise3DGenerator.cpp b/src/Generating/Noise3DGenerator.cpp index eb816f564..c3ca30384 100644 --- a/src/Generating/Noise3DGenerator.cpp +++ b/src/Generating/Noise3DGenerator.cpp @@ -236,7 +236,7 @@ void cNoise3DGenerator::GenerateNoiseArray(int a_ChunkX, int a_ChunkZ, NOISE_DAT m_Cubic.Generate2D(Height, DIM_X, DIM_Z, StartX / 25, EndX / 25, StartZ / 25, EndZ / 25); for (size_t i = 0; i < ARRAYCOUNT(Height); i++) { - Height[i] = abs(Height[i]) * m_HeightAmplification + 1; + Height[i] = std::abs(Height[i]) * m_HeightAmplification + 1; } // Modify the noise by height data: @@ -395,7 +395,7 @@ void cNoise3DComposable::GenerateNoiseArrayIfNeeded(int a_ChunkX, int a_ChunkZ) for (int x = 0; x < 17; x += UPSCALE_X) { NOISE_DATATYPE NoiseX = ((NOISE_DATATYPE)(a_ChunkX * cChunkDef::Width + x)) / m_FrequencyX; - NOISE_DATATYPE val = abs(m_Noise1.CubicNoise2D(NoiseX / 5, NoiseZ / 5)) * m_HeightAmplification + 1; + NOISE_DATATYPE val = std::abs(m_Noise1.CubicNoise2D(NoiseX / 5, NoiseZ / 5)) * m_HeightAmplification + 1; Height[x + 17 * z] = val * val * val; } } |