You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
Float literals - fix math classes to allow 32 bit calculations
Converts float literals from double format (e.g. 0.0) to float format (e.g. 0.0f) where appropriate for 32 bit calculations, and cast to (real_t) or (float) as appropriate. This ensures that appropriate calculations will be done at 32 bits when real_t is compiled as float, rather than promoted to 64 bits.
This commit is contained in:
@@ -64,7 +64,7 @@ Quat TransformInterpolator::_basis_to_quat_unchecked(const Basis &p_basis) {
|
||||
real_t trace = m.elements[0][0] + m.elements[1][1] + m.elements[2][2];
|
||||
real_t temp[4];
|
||||
|
||||
if (trace > 0.0) {
|
||||
if (trace > 0) {
|
||||
real_t s = Math::sqrt(trace + 1.0f);
|
||||
temp[3] = (s * 0.5f);
|
||||
s = 0.5f / s;
|
||||
|
||||
Reference in New Issue
Block a user