Esempio n. 1
0
        public void DistanceToRay_ReturnTheDistance_Between_APointAndTheRay()
        {
            Ray ray = new Ray(new Point()
            {
                0, 0, 0
            }, new Vector()
            {
                30, 45, 0
            });
            Point pt = new Point()
            {
                10, 20, 0
            };
            double distanceExpected = 2.7735009811261464;

            double distance = Trig.DistanceToRay(pt, ray);

            _testOutput.WriteLine(distance.ToString());
            distance.Should().Be(distanceExpected);
        }