summaryrefslogtreecommitdiffstats
path: root/src/Generating/Noise3DGenerator.cpp
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-09-25 16:22:08 +0200
committerTycho <work.tycho+git@gmail.com>2014-09-25 16:22:08 +0200
commit9c459cbe50dd7c7c327d712369b523dd018575bf (patch)
tree9dea40b71ffdca0dccf31fa1f005e279d822fa46 /src/Generating/Noise3DGenerator.cpp
parentFix accedental c++11 (diff)
parentMerge pull request #1449 from mc-server/WorldLoader (diff)
downloadcuberite-9c459cbe50dd7c7c327d712369b523dd018575bf.tar
cuberite-9c459cbe50dd7c7c327d712369b523dd018575bf.tar.gz
cuberite-9c459cbe50dd7c7c327d712369b523dd018575bf.tar.bz2
cuberite-9c459cbe50dd7c7c327d712369b523dd018575bf.tar.lz
cuberite-9c459cbe50dd7c7c327d712369b523dd018575bf.tar.xz
cuberite-9c459cbe50dd7c7c327d712369b523dd018575bf.tar.zst
cuberite-9c459cbe50dd7c7c327d712369b523dd018575bf.zip
Diffstat (limited to 'src/Generating/Noise3DGenerator.cpp')
-rw-r--r--src/Generating/Noise3DGenerator.cpp4
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;
}
}