diff options
author | Howaner <franzi.moos@googlemail.com> | 2014-09-23 14:39:49 +0200 |
---|---|---|
committer | Howaner <franzi.moos@googlemail.com> | 2014-09-23 14:39:49 +0200 |
commit | 4b38e077cf8d27d1c7ef26d4148f7825c5aeaabd (patch) | |
tree | cd86062eb50ba870f73b6f29dec0205f87205bf8 /src/Generating/Noise3DGenerator.cpp | |
parent | Merge branch 'master' into EntityCustomName (diff) | |
parent | QtBiomeVisualiser: Fixed confusion about Globals.h. (diff) | |
download | cuberite-4b38e077cf8d27d1c7ef26d4148f7825c5aeaabd.tar cuberite-4b38e077cf8d27d1c7ef26d4148f7825c5aeaabd.tar.gz cuberite-4b38e077cf8d27d1c7ef26d4148f7825c5aeaabd.tar.bz2 cuberite-4b38e077cf8d27d1c7ef26d4148f7825c5aeaabd.tar.lz cuberite-4b38e077cf8d27d1c7ef26d4148f7825c5aeaabd.tar.xz cuberite-4b38e077cf8d27d1c7ef26d4148f7825c5aeaabd.tar.zst cuberite-4b38e077cf8d27d1c7ef26d4148f7825c5aeaabd.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; } } |