summaryrefslogtreecommitdiffstats
path: root/src/Generating
diff options
context:
space:
mode:
authorAlexander Harkness <me@bearbin.net>2014-09-22 14:33:41 +0200
committerAlexander Harkness <me@bearbin.net>2014-09-22 14:33:41 +0200
commitb9b45e82876caf51cf486b72c811aa49ef67b1ed (patch)
treee39037971290a1b9fa6343c0c8f846541096d435 /src/Generating
parentQtBiomeVisualiser: Added the base for INI editting. (diff)
parentMade it compile with clang (diff)
downloadcuberite-b9b45e82876caf51cf486b72c811aa49ef67b1ed.tar
cuberite-b9b45e82876caf51cf486b72c811aa49ef67b1ed.tar.gz
cuberite-b9b45e82876caf51cf486b72c811aa49ef67b1ed.tar.bz2
cuberite-b9b45e82876caf51cf486b72c811aa49ef67b1ed.tar.lz
cuberite-b9b45e82876caf51cf486b72c811aa49ef67b1ed.tar.xz
cuberite-b9b45e82876caf51cf486b72c811aa49ef67b1ed.tar.zst
cuberite-b9b45e82876caf51cf486b72c811aa49ef67b1ed.zip
Diffstat (limited to 'src/Generating')
-rw-r--r--src/Generating/Caves.cpp2
-rw-r--r--src/Generating/Noise3DGenerator.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/Generating/Caves.cpp b/src/Generating/Caves.cpp
index 71154dff9..fc925a150 100644
--- a/src/Generating/Caves.cpp
+++ b/src/Generating/Caves.cpp
@@ -755,7 +755,7 @@ void cStructGenDualRidgeCaves::GenFinish(cChunkDesc & a_ChunkDesc)
float n2 = m_Noise2.CubicNoise3D(xx, yy, zz);
float n3 = m_Noise1.CubicNoise3D(xx * 4, yy * 4, zz * 4) / 4;
float n4 = m_Noise2.CubicNoise3D(xx * 4, yy * 4, zz * 4) / 4;
- if ((abs(n1 + n3) * abs(n2 + n4)) > m_Threshold)
+ if ((std::abs(n1 + n3) * std::abs(n2 + n4)) > m_Threshold)
{
a_ChunkDesc.SetBlockType(x, y, z, E_BLOCK_AIR);
}
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;
}
}