diff options
Diffstat (limited to 'src/mapgen')
-rw-r--r-- | src/mapgen/mapgen_carpathian.cpp | 4 | ||||
-rw-r--r-- | src/mapgen/mapgen_v7.cpp | 3 | ||||
-rw-r--r-- | src/mapgen/mapgen_valleys.cpp | 2 |
3 files changed, 4 insertions, 5 deletions
diff --git a/src/mapgen/mapgen_carpathian.cpp b/src/mapgen/mapgen_carpathian.cpp index db276ffba..1e12eafc3 100644 --- a/src/mapgen/mapgen_carpathian.cpp +++ b/src/mapgen/mapgen_carpathian.cpp @@ -347,11 +347,11 @@ float MapgenCarpathian::terrainLevelAtPoint(s16 x, s16 z) // Ridged mountains float ridge_mnt = hilliness * (1.f - std::fabs(n_ridge_mnt)); - float ridged_mountains = pow(rter, 3.f) * ridge_mnt; + float ridged_mountains = std::pow(rter, 3.f) * ridge_mnt; // Step (terraced) mountains float step_mnt = hilliness * getSteps(n_step_mnt); - float step_mountains = pow(ster, 3.f) * step_mnt; + float step_mountains = std::pow(ster, 3.f) * step_mnt; // Final terrain level float mountains = hills + ridged_mountains + step_mountains; diff --git a/src/mapgen/mapgen_v7.cpp b/src/mapgen/mapgen_v7.cpp index fba2defef..a99a50f29 100644 --- a/src/mapgen/mapgen_v7.cpp +++ b/src/mapgen/mapgen_v7.cpp @@ -29,7 +29,6 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "content_sao.h" #include "nodedef.h" #include "voxelalgorithms.h" -//#include "profiler.h" // For TimeTaker #include "settings.h" // For g_settings #include "emerge.h" #include "dungeongen.h" @@ -575,7 +574,7 @@ void MapgenV7::generateRidgeTerrain() float altitude = y - water_level; float height_mod = (altitude + 17) / 2.5; - float width_mod = width - fabs(uwatern); + float width_mod = width - std::fabs(uwatern); float nridge = noise_ridge->result[index] * MYMAX(altitude, 0) / 7.0; if (nridge + width_mod * height_mod < 0.6) diff --git a/src/mapgen/mapgen_valleys.cpp b/src/mapgen/mapgen_valleys.cpp index 54643583b..bef4629a8 100644 --- a/src/mapgen/mapgen_valleys.cpp +++ b/src/mapgen/mapgen_valleys.cpp @@ -433,7 +433,7 @@ int MapgenValleys::getSpawnLevelAtPoint(v2s16 p) { // Check to make sure this isn't a request for a location in a river. float rivers = NoisePerlin2D(&noise_rivers->np, p.X, p.Y, seed); - if (fabs(rivers) < river_size_factor) + if (std::fabs(rivers) < river_size_factor) return MAX_MAP_GENERATION_LIMIT; // Unsuitable spawn point s16 level_at_point = terrainLevelAtPoint(p.X, p.Y); |