示例#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);
        }