* 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
36349f667f
commit
ed5c64208b
2 changed files with 2 additions and 2 deletions
|
@ -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