diff --git a/src/OpenTK/Math/Quaternion.cs b/src/OpenTK/Math/Quaternion.cs index ddd6cda6..0d92d00a 100644 --- a/src/OpenTK/Math/Quaternion.cs +++ b/src/OpenTK/Math/Quaternion.cs @@ -66,8 +66,9 @@ namespace OpenTK { } /// - /// Construct a new Quaternion from given Euler angles. The rotations will get applied in following order: - /// 1. Around X, 2. Around Y, 3. Around Z + /// Construct a new Quaternion from given Euler angles in radians. + /// The rotations will get applied in following order: + /// 1. around X axis, 2. around Y axis, 3. around Z axis /// /// Counterclockwise rotation around X axis in radian /// Counterclockwise rotation around Y axis in radian @@ -409,7 +410,7 @@ namespace OpenTK } /// - /// Build a quaternion from the given axis and angle + /// Build a quaternion from the given axis and angle in radians /// /// The axis to rotate about /// The rotation angle in radians @@ -432,9 +433,9 @@ namespace OpenTK } /// - /// Builds a Quaternion from the given euler angles + /// Builds a Quaternion from the given euler angles in radians /// The rotations will get applied in following order: - /// 1. pitch, 2. yaw, 3. roll + /// 1. pitch (X axis), 2. yaw (Y axis), 3. roll (Z axis) /// /// The pitch (attitude), counterclockwise rotation around X axis /// The yaw (heading), counterclockwise rotation around Y axis @@ -446,9 +447,9 @@ namespace OpenTK } /// - /// Builds a Quaternion from the given euler angles + /// Builds a Quaternion from the given euler angles in radians. /// The rotations will get applied in following order: - /// 1. Around X, 2. Around Y, 3. Around Z + /// 1. X axis, 2. Y axis, 3. Z axis /// /// The counterclockwise euler angles as a vector /// The equivalent Quaternion diff --git a/tests/OpenTK.Tests.Math/QuaternionTests.cs b/tests/OpenTK.Tests.Math/QuaternionTests.cs index 27f0a28b..d07fa732 100644 --- a/tests/OpenTK.Tests.Math/QuaternionTests.cs +++ b/tests/OpenTK.Tests.Math/QuaternionTests.cs @@ -50,7 +50,7 @@ namespace OpenTK.Tests.Math /// or does not contain 0 when it should be /// To test /// Expected directions. Values getting only 0 checked - public static bool VerifyEuqalSignleDirection(Vector3 toTest, Vector3 expected) + public static bool VerifyEqualSingleDirection(Vector3 toTest, Vector3 expected) { //To verify the direction of an vector, just respect the 0 values and check against these. //The length of the vectors are ignored. @@ -109,7 +109,7 @@ namespace OpenTK.Tests.Math //Assert: Use helper, to check if part of the two correct axis is zero. I just want check the direction Vector3 resultXYZ = cut.Xyz; - Assert.True(QuaternionTestHelper.VerifyEuqalSignleDirection(resultXYZ, expectedResult)); + Assert.True(QuaternionTestHelper.VerifyEqualSingleDirection(resultXYZ, expectedResult)); } /// @@ -128,7 +128,7 @@ namespace OpenTK.Tests.Math //Assert: Use helper, to check if part of the two correct axis is zero. I just want check the direction Vector3 resultXYZ = cut.Xyz; - Assert.True(QuaternionTestHelper.VerifyEuqalSignleDirection(resultXYZ, expectedResult)); + Assert.True(QuaternionTestHelper.VerifyEqualSingleDirection(resultXYZ, expectedResult)); } /// @@ -147,7 +147,7 @@ namespace OpenTK.Tests.Math //Assert: Use helper, to check if part of the two correct axis is zero. I just want check the direction Vector3 resultXYZ = cut.Xyz; - Assert.True(QuaternionTestHelper.VerifyEuqalSignleDirection(resultXYZ, expectedResult)); + Assert.True(QuaternionTestHelper.VerifyEqualSingleDirection(resultXYZ, expectedResult)); } /// @@ -166,7 +166,7 @@ namespace OpenTK.Tests.Math //Assert: Use helper, to check if part of the two correct axis is zero. I just want check the direction Vector3 resultXYZ = cut.Xyz; - Assert.True(QuaternionTestHelper.VerifyEuqalSignleDirection(resultXYZ, expectedResult)); + Assert.True(QuaternionTestHelper.VerifyEqualSingleDirection(resultXYZ, expectedResult)); } /// @@ -186,7 +186,7 @@ namespace OpenTK.Tests.Math //Assert: Use helper, to check if part of the two correct axis is zero. I just want check the direction Vector3 resultXYZ = cut.Xyz; - Assert.True(QuaternionTestHelper.VerifyEuqalSignleDirection(resultXYZ, expectedResult)); + Assert.True(QuaternionTestHelper.VerifyEqualSingleDirection(resultXYZ, expectedResult)); } /// @@ -205,7 +205,7 @@ namespace OpenTK.Tests.Math cut.ToAxisAngle(out resultXYZ, out dontCare); //Assert: Use helper, to check if part of the two correct axis is zero. I just want check the direction - Assert.True(QuaternionTestHelper.VerifyEuqalSignleDirection(resultXYZ, expectedResult)); + Assert.True(QuaternionTestHelper.VerifyEqualSingleDirection(resultXYZ, expectedResult)); } //TODO: Make also checks with rotation angle