Example #1
0
        public int CompareTo(ProjCoordinate other)
        {
            if (Equals(other))
            {
                return(0);
            }

            if (!CoordinateChecker.AreXOrdinatesEqual(this, other, 0))
            {
                return(X < other.X ? -1 : 1);
            }
            if (!CoordinateChecker.AreYOrdinatesEqual(this, other, 0))
            {
                return(Y < other.Y ? -1 : 1);
            }

            if (CoordinateChecker.HasValidZOrdinate(this))
            {
                if (!CoordinateChecker.HasValidZOrdinate(other))
                {
                    return(-1);
                }
                return(Z < other.Z ? -1 : 1);
            }

            if (CoordinateChecker.HasValidZOrdinate(other))
            {
                return(Z < other.Z ? -1 : 1);
            }

            return(0);
        }
Example #2
0
 public bool Equals(ProjCoordinate other)
 {
     return(CoordinateChecker.AreXOrdinatesEqual(this, other, 0) &&
            CoordinateChecker.AreYOrdinatesEqual(this, other, 0) &&
            CoordinateChecker.AreZOrdinatesEqual(this, other, 0));
 }