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:
parent
baca933b6b
commit
67a4cb7d8a
8 changed files with 20 additions and 17 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue