public void TestEquals() { Geodetic2D a = new Geodetic2D(1.0, 2.0); Geodetic2D b = new Geodetic2D(2.0, 3.0); Geodetic2D c = new Geodetic2D(2.0, 3.0); object objA = a; object objB = b; object objC = c; Assert.IsTrue(a.Equals(a)); Assert.IsTrue(b.Equals(c)); Assert.IsTrue(a.Equals(objA)); Assert.IsTrue(b.Equals(objC)); Assert.IsTrue(objA.Equals(objA)); Assert.IsTrue(objB.Equals(objC)); Assert.IsTrue(b == c); Assert.IsTrue(c == b); Assert.IsTrue(a != b); Assert.IsFalse(a.Equals(b)); Assert.IsFalse(a.Equals(c)); Assert.IsFalse(a.Equals(objB)); Assert.IsFalse(a.Equals(objC)); Assert.IsFalse(objA.Equals(objB)); Assert.IsFalse(objA.Equals(objC)); Assert.IsFalse(a == b); Assert.IsFalse(a == c); Assert.IsFalse(b != c); Assert.IsFalse(a.Equals(null)); Assert.IsFalse(a.Equals(5)); }
public static Geodetic2D ToDegrees(Geodetic2D geodetic) { return(new Geodetic2D(ToDegrees(geodetic.Longitude), ToDegrees(geodetic.Latitude))); }
public Geodetic3D(Geodetic2D geodetic2D, double height) { _longitude = geodetic2D.Longitude; _latitude = geodetic2D.Latitude; _height = height; }
public Vector3D ToVector3D(Geodetic2D geodetic) { return(ToVector3D(new Geodetic3D(geodetic.Longitude, geodetic.Latitude, 0.0))); }
public Geodetic3D(Geodetic2D geodetic2D) { _longitude = geodetic2D.Longitude; _latitude = geodetic2D.Latitude; _height = 0; }