public void TestHashCode()
        {
            var e1 = Ellipsoid.FromAAndInverseF(100000, 100);
            var e2 = Ellipsoid.FromAAndInverseF(100000, 101);

            Assert.AreNotEqual(e1.GetHashCode(), e2.GetHashCode());
        }
        public void TestFactory2()
        {
            var e = Ellipsoid.FromAAndInverseF(100000, 100);

            Assert.AreEqual(e.SemiMinorAxis, (1 - 0.01) * 100000);
            Assert.AreEqual(0.01, e.Flattening);
            Assert.AreEqual(100000, e.SemiMajorAxis);
            Assert.AreEqual(e.Ratio, 1.0 - 0.01);
        }
        public void TestInEquality()
        {
            var e1 = Ellipsoid.FromAAndInverseF(100000, 100);
            var e2 = Ellipsoid.FromAAndInverseF(100000, 100);
            var e3 = Ellipsoid.FromAAndInverseF(100000, 101);
            var e4 = Ellipsoid.FromAAndInverseF(100000, 100 + 1e-13);

            Assert.IsFalse(e1 != e2);
            Assert.IsTrue(e1 != e3);
            Assert.IsFalse(e1 != e4);
        }
Exemple #4
0
        public void TestEquality()
        {
            Ellipsoid e1 = Ellipsoid.FromAAndInverseF(100000, 100);
            Ellipsoid e2 = Ellipsoid.FromAAndInverseF(100000, 100);
            Ellipsoid e3 = Ellipsoid.FromAAndInverseF(100000, 101);
            Ellipsoid e4 = Ellipsoid.FromAAndInverseF(100000, 100 + 1e-13);
            Ellipsoid e5 = Ellipsoid.FromAAndInverseF(99000, 100);

            Assert.IsTrue(e1 == e2);
            Assert.IsFalse(e1 == e3);
            Assert.IsTrue(e1 == e4);
            Assert.IsFalse(e1 == e5);
        }
        public void TestEquals()
        {
            var    e1 = Ellipsoid.FromAAndInverseF(100000, 100);
            var    e2 = Ellipsoid.FromAAndInverseF(100000, 100);
            var    e3 = Ellipsoid.FromAAndInverseF(100000, 101);
            var    e4 = Ellipsoid.FromAAndInverseF(100000, 100 + 1e-13);
            object s  = "123";

            Assert.IsTrue(e1.Equals(e2));
            Assert.IsFalse(e1.Equals(e3));
            Assert.IsTrue(e1.Equals(e4));
            Assert.IsFalse(e1.Equals(null));
            Assert.IsFalse(e1.Equals(s));
        }