1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-27 17:28:41 +00:00

Fix various clang-tidy reported performance-type-promotion-in-math-fn

This commit is contained in:
Loïc Blot 2018-04-03 18:16:17 +02:00
parent baca933b6b
commit 67a4cb7d8a
8 changed files with 20 additions and 17 deletions

View file

@ -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);