mirror of
https://github.com/minetest/irrlicht.git
synced 2024-12-25 02:00:30 +01:00
Use f64 version of reciprocal_squareroot in quaternion::normalize for more precision.
The f32 version jumped around more on gcc/linux (didn't do so with VisualStudio, mabye sqrt on VS already uses double internally). git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6036 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
parent
34d09f7c63
commit
5d0b042a65
@ -585,7 +585,7 @@ inline quaternion& quaternion::normalize()
|
|||||||
{
|
{
|
||||||
// removed conditional branch since it may slow down and anyway the condition was
|
// removed conditional branch since it may slow down and anyway the condition was
|
||||||
// false even after normalization in some cases.
|
// false even after normalization in some cases.
|
||||||
return (*this *= reciprocal_squareroot ( X*X + Y*Y + Z*Z + W*W ));
|
return (*this *= (f32)reciprocal_squareroot ( (f64)(X*X + Y*Y + Z*Z + W*W) ));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set this quaternion to the result of the linear interpolation between two quaternions
|
// Set this quaternion to the result of the linear interpolation between two quaternions
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
Tests finished. 72 tests of 72 passed.
|
Tests finished. 72 tests of 72 passed.
|
||||||
Compiled as DEBUG
|
Compiled as DEBUG
|
||||||
Test suite pass at GMT Fri Jan 03 14:40:24 2020
|
Test suite pass at GMT Fri Jan 3 17:05:41 2020
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user