From 4ae58b30733b41eb06377cbe662d47f86c82a590 Mon Sep 17 00:00:00 2001 From: Jarl Gullberg Date: Sat, 3 Jun 2017 22:42:39 +0200 Subject: [PATCH] Changed some Equals to ApproximatelyEquals. --- tests/OpenTK.Tests/Vector2Tests.fs | 4 ++-- tests/OpenTK.Tests/Vector4Tests.fs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/OpenTK.Tests/Vector2Tests.fs b/tests/OpenTK.Tests/Vector2Tests.fs index f9e741e3..a77d2796 100644 --- a/tests/OpenTK.Tests/Vector2Tests.fs +++ b/tests/OpenTK.Tests/Vector2Tests.fs @@ -567,7 +567,7 @@ module Vector2 = let transformedQuat = q * vectorQuat * inverse let transformedVector = Vector2(transformedQuat.X, transformedQuat.Y) - Assert.Equal(transformedVector, Vector2.Transform(v, q)) + Assert.ApproximatelyEqual(transformedVector, Vector2.Transform(v, q)) [] let ``Transformation by quaternion by reference is the same as multiplication by quaternion and its conjugate`` (v : Vector2, q : Quaternion) = @@ -577,7 +577,7 @@ module Vector2 = let transformedQuat = q * vectorQuat * inverse let transformedVector = Vector2(transformedQuat.X, transformedQuat.Y) - Assert.Equal(transformedVector, Vector2.Transform(ref v, ref q)) + Assert.ApproximatelyEqual(transformedVector, Vector2.Transform(ref v, ref q)) [ |])>] module Serialization = diff --git a/tests/OpenTK.Tests/Vector4Tests.fs b/tests/OpenTK.Tests/Vector4Tests.fs index 193c77c5..addc1608 100644 --- a/tests/OpenTK.Tests/Vector4Tests.fs +++ b/tests/OpenTK.Tests/Vector4Tests.fs @@ -885,7 +885,7 @@ module Vector4 = let transformedQuat = q * vectorQuat * inverse let transformedVector = Vector4(transformedQuat.X, transformedQuat.Y, transformedQuat.Z, transformedQuat.W) - Assert.Equal(transformedVector, Vector4.Transform(v, q)) + Assert.ApproximatelyEqual(transformedVector, Vector4.Transform(v, q)) [] let ``Transformation by quaternion with static method by reference is the same as multiplication by quaternion and its conjugate`` (v : Vector4, q : Quaternion) = @@ -895,7 +895,7 @@ module Vector4 = let transformedQuat = q * vectorQuat * inverse let transformedVector = Vector4(transformedQuat.X, transformedQuat.Y,transformedQuat.Z, transformedQuat.W) - Assert.Equal(transformedVector, Vector4.Transform(ref v, ref q)) + Assert.ApproximatelyEqual(transformedVector, Vector4.Transform(ref v, ref q)) [] let ``Transformation by quaternion by multiplication using right-handed notation is the same as multiplication by quaternion and its conjugate`` (v : Vector4, q : Quaternion) = @@ -905,4 +905,4 @@ module Vector4 = let transformedQuat = q * vectorQuat * inverse let transformedVector = Vector4(transformedQuat.X, transformedQuat.Y, transformedQuat.Z, transformedQuat.W) - Assert.Equal(transformedVector, q * v) \ No newline at end of file + Assert.ApproximatelyEqual(transformedVector, q * v) \ No newline at end of file