public void Negate()
        {
            var m = Matrix3x2.Identity;

            Matrix3x2[] input          = { m };
            Matrix3x2[] expectedOutput = { -m };

            Matrix3x2[] output1 = input.AsCompute().Select(x => Matrix3x2.Negate(x)).ToArray();
            Matrix3x2[] output2 = input.AsCompute().Select(x => - x).ToArray();

            Assert.Equal(expectedOutput, output1);
            Assert.Equal(expectedOutput, output2);
        }
Beispiel #2
0
        public void Matrix3x2NegateTest()
        {
            Matrix3x2 m = GenerateMatrixNumberFrom1To6();

            Matrix3x2 expected = new Matrix3x2();

            expected.M11 = -1.0f; expected.M12 = -2.0f;
            expected.M21 = -3.0f; expected.M22 = -4.0f;
            expected.M31 = -5.0f; expected.M32 = -6.0f;
            Matrix3x2 actual;

            actual = Matrix3x2.Negate(m);
            Assert.AreEqual(expected, actual, "Matrix3x2.Negate did not return the expected value.");
        }
        public void Matrix3x2NegateTest()
        {
            Matrix3x2 m = GenerateIncrementalMatrixNumber();

            Matrix3x2 expected = new Matrix3x2();

            expected.M11 = -1.0f;
            expected.M12 = -2.0f;
            expected.M21 = -3.0f;
            expected.M22 = -4.0f;
            expected.M31 = -5.0f;
            expected.M32 = -6.0f;
            Matrix3x2 actual;

            actual = Matrix3x2.Negate(m);
            Assert.Equal(expected, actual);
        }
 public static Matrix3x2 Negate(this Matrix3x2 matrix)
 {
     return(Matrix3x2.Negate(matrix));
 }
Beispiel #5
0
 public static Matrix3x2 Negate(this Matrix3x2 value)
 {
     return(Matrix3x2.Negate(value));
 }