mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-14 00:55:20 +02:00
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.
This commit is contained in:
@@ -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
|
||||
);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user