Пример #1
0
        public void distance_squared_test()
        {
            var ray = new Ray2(new Point2(1, 1), new Vector2(2, 1));

            Assert.Equal(1 + (.5 * .5), ray.DistanceSquared(new Point2(1.5, 2.5)));
            Assert.Equal(4, ray.DistanceSquared(new Point2(-1, 1)));
        }
Пример #2
0
        public void distance_squared_test() {
            var ray = new Ray2(new Point2(1, 1), new Vector2(2, 1));

            Assert.Equal(1 + (.5 * .5), ray.DistanceSquared(new Point2(1.5, 2.5)));
            Assert.Equal(4, ray.DistanceSquared(new Point2(-1, 1)));
        }