示例#1
0
        public void MultiplyTupleByFraction()
        {
            var v1       = new Tuple <double, double, double, double>(1, -2, 3, -4);
            var expected = new Tuple <double, double, double, double>(0.5, -1, 1.5, -2);
            var neg      = PointType.MultiplyTuple(v1, 0.5);

            Assert.Equal(expected, neg);
        }
示例#2
0
        public void MultiplyTupleByScalar()
        {
            var v1       = new Tuple <double, double, double, double>(1, -2, 3, -4);
            var expected = new Tuple <double, double, double, double>(3.5, -7, 10.5, -14);
            var neg      = PointType.MultiplyTuple(v1, 3.5);

            Assert.Equal(expected, neg);
        }