diff options
author | Jens Rottmann <30634967+JRottm@users.noreply.github.com> | 2017-08-20 19:37:55 +0200 |
---|---|---|
committer | Loïc Blot <nerzhul@users.noreply.github.com> | 2017-08-20 19:37:55 +0200 |
commit | 9d8cb510b3ad398c4fcb214704a2c3a42e944e34 (patch) | |
tree | 51a1bf3985f64eac66e78cf53880186f919e2306 /src/util | |
parent | ae9b5e00989756bb676429530dfe81039009001c (diff) | |
download | minetest-9d8cb510b3ad398c4fcb214704a2c3a42e944e34.tar.gz minetest-9d8cb510b3ad398c4fcb214704a2c3a42e944e34.tar.bz2 minetest-9d8cb510b3ad398c4fcb214704a2c3a42e944e34.zip |
Change BS constant from implicit double to float (#6286)
the BS constant
implicitly promotes all position calculations it is used in to double even
though positions (= v3f) are only meant to be floats.
There are many, many similar occurrences everywhere, but I'm not willing to
hunt down all; I only fixed the little part I'm already familiar with.
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/numeric.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/util/numeric.h b/src/util/numeric.h index 766efd366..f09c4e9f5 100644 --- a/src/util/numeric.h +++ b/src/util/numeric.h @@ -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 ); } |