Skip to content

Commit

Permalink
Use fabs() instead of abs() (#5141)
Browse files Browse the repository at this point in the history
  • Loading branch information
juhdanad authored and nerzhul committed Jan 30, 2017
1 parent f0e3abc commit 6642c85
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mapblock_mesh.cpp
Expand Up @@ -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;

Expand Down

0 comments on commit 6642c85

Please sign in to comment.