Beispiel #1
0
        public virtual void DistanceSquareByPointTest()
        {
            Point  first    = new Point(1, 1);
            Point  second   = new Point(1.1, 1.1);
            double expected = 0.02;

            NUnit.Framework.Assert.AreEqual(expected, first.DistanceSq(second), EPSILON_COMPARISON);
        }
Beispiel #2
0
        public virtual void DistanceSquareBetweenCoordinatesTest()
        {
            Point  first    = new Point(1, 1);
            Point  second   = new Point(1.1, 1.1);
            double expected = 0.02;

            NUnit.Framework.Assert.AreEqual(expected, Point.DistanceSq(first.x, first.y, second.x, second.y), EPSILON_COMPARISON
                                            );
        }
Beispiel #3
0
        public virtual void DistanceItselfSquareTest()
        {
            Point first = new Point(1, 1);

            NUnit.Framework.Assert.AreEqual(0, first.DistanceSq(first), EPSILON_COMPARISON);
        }