Use fabs() instead of abs() (#5141)

This commit is contained in:
Dániel Juhász 2017-01-30 08:18:18 +01:00 committed by Loïc Blot
parent f0e3abc64d
commit 6642c8583a
1 changed files with 2 additions and 2 deletions

View File

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