예제 #1
0
        public static int Compare(IntPair a, IntPair b) {
            if (a < b)
                return 1;
            if (a == b)
                return 0;

            return -1;
        }
예제 #2
0
        public override bool Equals(object obj)
        {
            IntPair other = obj as IntPair;

            if (other == null)
            {
                return(false);
            }

            return(x == other.x && y == other.y);
        }
예제 #3
0
        public static int Compare(IntPair a, IntPair b)
        {
            if (a < b)
            {
                return(1);
            }
            if (a == b)
            {
                return(0);
            }

            return(-1);
        }