diff --git a/Source/OpenTK/Math/Quaternion.cs b/Source/OpenTK/Math/Quaternion.cs index da62d7c4..8ee0fc01 100644 --- a/Source/OpenTK/Math/Quaternion.cs +++ b/Source/OpenTK/Math/Quaternion.cs @@ -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(); diff --git a/Source/OpenTK/Math/Quaterniond.cs b/Source/OpenTK/Math/Quaterniond.cs index 9f116f93..46aec949 100644 --- a/Source/OpenTK/Math/Quaterniond.cs +++ b/Source/OpenTK/Math/Quaterniond.cs @@ -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();