mirror of
https://github.com/g-truc/glm.git
synced 2024-11-26 10:14:35 +00:00
Merge pull request #1012 from bosmacs/master
Fix quaternion orientation in `glm::decompose` #1012
This commit is contained in:
commit
1cf91a1009
@ -159,9 +159,9 @@ namespace detail
|
|||||||
root = sqrt(trace + static_cast<T>(1.0));
|
root = sqrt(trace + static_cast<T>(1.0));
|
||||||
Orientation.w = static_cast<T>(0.5) * root;
|
Orientation.w = static_cast<T>(0.5) * root;
|
||||||
root = static_cast<T>(0.5) / root;
|
root = static_cast<T>(0.5) / root;
|
||||||
Orientation.x = root * (Row[1].z - Row[2].y);
|
Orientation.x = root * (Row[2].y - Row[1].z);
|
||||||
Orientation.y = root * (Row[2].x - Row[0].z);
|
Orientation.y = root * (Row[0].z - Row[2].x);
|
||||||
Orientation.z = root * (Row[0].y - Row[1].x);
|
Orientation.z = root * (Row[1].x - Row[0].y);
|
||||||
} // End if > 0
|
} // End if > 0
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user