mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-11 07:55:42 +00:00
* Quaternion.cs:
* Quaterniond.cs: Check for W > 1.0 _or_ W < -1.0 before normalizing in ToAxisAngle. Resolves issue [#2465]: "Quaternion rotation bug".
This commit is contained in:
parent
45083fb996
commit
e9939e0dc6
|
@ -135,7 +135,7 @@ namespace OpenTK
|
|||
public Vector4 ToAxisAngle()
|
||||
{
|
||||
Quaternion q = this;
|
||||
if (q.W > 1.0f)
|
||||
if (Math.Abs(q.W) > 1.0f)
|
||||
q.Normalize();
|
||||
|
||||
Vector4 result = new Vector4();
|
||||
|
|
|
@ -135,7 +135,7 @@ namespace OpenTK
|
|||
public Vector4d ToAxisAngle()
|
||||
{
|
||||
Quaterniond q = this;
|
||||
if (q.W > 1.0f)
|
||||
if (Math.Abs(q.W) > 1.0f)
|
||||
q.Normalize();
|
||||
|
||||
Vector4d result = new Vector4d();
|
||||
|
|
Loading…
Reference in a new issue