1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +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

@ -18,6 +18,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
*/
#include "collision.h"
#include <cmath>
#include "mapblock.h"
#include "map.h"
#include "nodedef.h"
@ -564,7 +565,7 @@ collisionMoveResult collisionMoveSimple(Environment *env, IGameDef *gamedef,
box.MinEdge += *pos_f;
box.MaxEdge += *pos_f;
}
if (fabs(cbox.MaxEdge.Y - box.MinEdge.Y) < 0.15f * BS) {
if (std::fabs(cbox.MaxEdge.Y - box.MinEdge.Y) < 0.15f * BS) {
result.touching_ground = true;
if (box_info.is_object)