1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Float literals - fix main primitives to use .f

Converts float literals from double format (e.g. 0.0) to float format (e.g. 0.0f) where appropriate for 32 bit calculations.
This commit is contained in:
lawnjelly
2022-02-06 11:14:58 +00:00
parent 38c851a3fa
commit 5298e16e80
21 changed files with 222 additions and 222 deletions

View File

@@ -93,11 +93,11 @@ Vector3 Vector3::cubic_interpolate(const Vector3 &p_b, const Vector3 &p_pre_a, c
real_t t3 = t2 * t;
Vector3 out;
out = 0.5 *
((p1 * 2.0) +
out = 0.5f *
((p1 * 2.0f) +
(-p0 + p2) * t +
(2.0 * p0 - 5.0 * p1 + 4.0 * p2 - p3) * t2 +
(-p0 + 3.0 * p1 - 3.0 * p2 + p3) * t3);
(2.0f * p0 - 5.0f * p1 + 4.0f * p2 - p3) * t2 +
(-p0 + 3.0f * p1 - 3.0f * p2 + p3) * t3);
return out;
}