aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDániel Juhász <juhdanad@gmail.com>2017-01-30 08:18:18 +0100
committerLoïc Blot <nerzhul@users.noreply.github.com>2017-01-30 08:18:18 +0100
commit6642c8583a8635a5d61f11ca53254b4ae03d9c70 (patch)
tree0b5dbce5f337070d7159149f6191b121dd73a454 /src
parentf0e3abc64d1c79c024f588e6d7ccd27e021c4a9a (diff)
downloadminetest-6642c8583a8635a5d61f11ca53254b4ae03d9c70.tar.gz
minetest-6642c8583a8635a5d61f11ca53254b4ae03d9c70.tar.bz2
minetest-6642c8583a8635a5d61f11ca53254b4ae03d9c70.zip
Use fabs() instead of abs() (#5141)
Diffstat (limited to 'src')
-rw-r--r--src/mapblock_mesh.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mapblock_mesh.cpp b/src/mapblock_mesh.cpp
index 79d02d6ff..2520b5459 100644
--- a/src/mapblock_mesh.cpp
+++ b/src/mapblock_mesh.cpp
@@ -1090,9 +1090,9 @@ MapBlockMesh::MapBlockMesh(MeshMakeData *data, v3s16 camera_offset):
brightness of vertices 1 and 3 differ less than
the brightness of vertices 0 and 2.
*/
- if (abs(f.vertices[0].Color.getLuminance()
+ if (fabs(f.vertices[0].Color.getLuminance()
- f.vertices[2].Color.getLuminance())
- > abs(f.vertices[1].Color.getLuminance()
+ > fabs(f.vertices[1].Color.getLuminance()
- f.vertices[3].Color.getLuminance()))
indices_p = indices_alternate;