예제 #1
0
        public override bool Equals(object obj)
        {
            if (!(obj is MajorMinor))
            {
                return(false);
            }
            MajorMinor minor = (MajorMinor)obj;

            return(minor == this);
        }
예제 #2
0
 static MajorMinor()
 {
     Zero = new MajorMinor(0, 0);
 }
예제 #3
0
 public static MajorMinor Min(MajorMinor a, MajorMinor b)
 {
     return new MajorMinor(Math.Min(a.Major, b.Major), Math.Min(a.Minor, b.Minor));
 }
예제 #4
0
 public static MajorMinor Max(MajorMinor a, MajorMinor b)
 {
     return(new MajorMinor(Math.Max(a.Major, b.Major), Math.Max(a.Minor, b.Minor)));
 }
예제 #5
0
 static MajorMinor()
 {
     Zero = new MajorMinor(0, 0);
 }