From 05fcf7961e1c2d49833e056e096cc6e463142175 Mon Sep 17 00:00:00 2001 From: Jarl Gullberg Date: Wed, 31 May 2017 22:20:46 +0200 Subject: [PATCH] Added final multiplication test and split one test into two. --- tests/OpenTK.Tests/Vector3Tests.fs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tests/OpenTK.Tests/Vector3Tests.fs b/tests/OpenTK.Tests/Vector3Tests.fs index a209386..b3ece0c 100644 --- a/tests/OpenTK.Tests/Vector3Tests.fs +++ b/tests/OpenTK.Tests/Vector3Tests.fs @@ -282,18 +282,27 @@ module Vector3 = Assert.Equal(r1, r2) [] - let ``Vector3-float multiplication is the same as component-float multiplication`` (a : Vector3, f : float32) = + let ``Left-handed Vector3-scalar multiplication is the same as component-scalar multiplication`` (a : Vector3, f : float32) = let r = a * f Assert.Equal(a.X * f,r.X) Assert.Equal(a.Y * f,r.Y) Assert.Equal(a.Z * f,r.Z) - // Inverse direction + [] + let ``Right-handed Vector3-scalar multiplication is the same as component-scalar multiplication`` (a : Vector3, f : float32) = let r = f * a Assert.Equal(a.X * f,r.X) Assert.Equal(a.Y * f,r.Y) Assert.Equal(a.Z * f,r.Z) + + [] + let ``Static method Vector3-scalar multiplication is the same as component-scalar multiplication`` (a : Vector3, f : float32) = + let r = Vector3.Multiply(a, f) + + Assert.Equal(a.X * f,r.X) + Assert.Equal(a.Y * f,r.Y) + Assert.Equal(a.Z * f,r.Z) [] let ``Vector3-Matrix3 multiplication works for right-handed notation`` (a : Matrix3, b : Vector3) = -- 2.7.4