Changed some Equals to ApproximatelyEquals.

This commit is contained in:
Jarl Gullberg 2017-06-03 22:42:39 +02:00
parent ecdd0cdc0d
commit 4ae58b3073
No known key found for this signature in database
GPG key ID: 750FF6F6BDA72D23
2 changed files with 5 additions and 5 deletions

View file

@ -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))
[<Property>]
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))
[<Properties(Arbitrary = [| typeof<OpenTKGen> |])>]
module Serialization =

View file

@ -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))
[<Property>]
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))
[<Property>]
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)
Assert.ApproximatelyEqual(transformedVector, q * v)