Changed some Equals to ApproximatelyEquals.
This commit is contained in:
parent
ecdd0cdc0d
commit
4ae58b3073
2 changed files with 5 additions and 5 deletions
|
@ -567,7 +567,7 @@ module Vector2 =
|
||||||
let transformedQuat = q * vectorQuat * inverse
|
let transformedQuat = q * vectorQuat * inverse
|
||||||
let transformedVector = Vector2(transformedQuat.X, transformedQuat.Y)
|
let transformedVector = Vector2(transformedQuat.X, transformedQuat.Y)
|
||||||
|
|
||||||
Assert.Equal(transformedVector, Vector2.Transform(v, q))
|
Assert.ApproximatelyEqual(transformedVector, Vector2.Transform(v, q))
|
||||||
|
|
||||||
[<Property>]
|
[<Property>]
|
||||||
let ``Transformation by quaternion by reference is the same as multiplication by quaternion and its conjugate`` (v : Vector2, q : Quaternion) =
|
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 transformedQuat = q * vectorQuat * inverse
|
||||||
let transformedVector = Vector2(transformedQuat.X, transformedQuat.Y)
|
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> |])>]
|
[<Properties(Arbitrary = [| typeof<OpenTKGen> |])>]
|
||||||
module Serialization =
|
module Serialization =
|
||||||
|
|
|
@ -885,7 +885,7 @@ module Vector4 =
|
||||||
let transformedQuat = q * vectorQuat * inverse
|
let transformedQuat = q * vectorQuat * inverse
|
||||||
let transformedVector = Vector4(transformedQuat.X, transformedQuat.Y, transformedQuat.Z, transformedQuat.W)
|
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>]
|
[<Property>]
|
||||||
let ``Transformation by quaternion with static method by reference is the same as multiplication by quaternion and its conjugate`` (v : Vector4, q : Quaternion) =
|
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 transformedQuat = q * vectorQuat * inverse
|
||||||
let transformedVector = Vector4(transformedQuat.X, transformedQuat.Y,transformedQuat.Z, transformedQuat.W)
|
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>]
|
[<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) =
|
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 transformedQuat = q * vectorQuat * inverse
|
||||||
let transformedVector = Vector4(transformedQuat.X, transformedQuat.Y, transformedQuat.Z, transformedQuat.W)
|
let transformedVector = Vector4(transformedQuat.X, transformedQuat.Y, transformedQuat.Z, transformedQuat.W)
|
||||||
|
|
||||||
Assert.Equal(transformedVector, q * v)
|
Assert.ApproximatelyEqual(transformedVector, q * v)
|
Loading…
Reference in a new issue