Move files to subdirectories (#6599)
[oweals/minetest.git] / src / util / numeric.h
index 36e6fddd0825b2c2607acece66b4b0e49b39e449..347e7a49ea9939fb93b5d2cf723fb93ce4edb780 100644 (file)
@@ -20,10 +20,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #pragma once
 
 #include "basic_macros.h"
-#include "../irrlichttypes.h"
-#include "../irr_v2d.h"
-#include "../irr_v3d.h"
-#include "../irr_aabb3d.h"
+#include "irrlichttypes.h"
+#include "irr_v2d.h"
+#include "irr_v3d.h"
+#include "irr_aabb3d.h"
 
 #define rangelim(d, min, max) ((d) < (min) ? (min) : ((d) > (max) ? (max) : (d)))
 #define myfloor(x) ((x) < 0.0 ? (int)(x) - 1 : (int)(x))
@@ -268,12 +268,12 @@ inline v3f intToFloat(v3s16 p, f32 d)
 inline aabb3f getNodeBox(v3s16 p, float d)
 {
        return aabb3f(
-               (float)p.X * d - 0.5 * d,
-               (float)p.Y * d - 0.5 * d,
-               (float)p.Z * d - 0.5 * d,
-               (float)p.X * d + 0.5 * d,
-               (float)p.Y * d + 0.5 * d,
-               (float)p.Z * d + 0.5 * d
+               (float)p.X * d - 0.5f * d,
+               (float)p.Y * d - 0.5f * d,
+               (float)p.Z * d - 0.5f * d,
+               (float)p.X * d + 0.5f * d,
+               (float)p.Y * d + 0.5f * d,
+               (float)p.Z * d + 0.5f * d
        );
 }
 
@@ -281,7 +281,8 @@ inline aabb3f getNodeBox(v3s16 p, float d)
 class IntervalLimiter
 {
 public:
-       IntervalLimiter() {}
+       IntervalLimiter() = default;
+
        /*
                dtime: time from last call to this method
                wanted_interval: interval wanted