module Equality =
//
[<Property>]
- let ``Sixteen value constructor sets all components to the correct values`` (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) =
+ let ``Two matrices with identical values are equal`` (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) =
let A = Matrix4(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p)
let B = Matrix4(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p)
let equality = A = B
Assert.True(equality)
+ [<Property>]
+ let ``A matrix is not equal to an object which is not a matrix`` (a : Matrix4, b : Vector3) =
+ Assert.False(a.Equals(b))
+
[<Properties(Arbitrary = [| typeof<OpenTKGen> |])>]
module Multiplication =
//
let ``Normalization of instance, creating a new vector, works`` (a, b, c) =
let v = Vector3(a, b, c)
let l = v.Length
-
+
let norm = v.Normalized()
Assert.ApproximatelyEqual(v.X / l, norm.X)
Assert.ApproximatelyEqual(v.Y / l, norm.Y)
Assert.ApproximatelyEqual(v.Z / l, norm.Z)
-
+
[<Property>]
let ``Normalization of instance works`` (a, b, c) =
let v = Vector3(a, b, c)