コード例 #1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (MInt != 0)
            {
                hash ^= MInt.GetHashCode();
            }
            if (MFloat != 0F)
            {
                hash ^= MFloat.GetHashCode();
            }
            if (MDouble != 0D)
            {
                hash ^= MDouble.GetHashCode();
            }
            if (MBool != false)
            {
                hash ^= MBool.GetHashCode();
            }
            if (MByte != 0)
            {
                hash ^= MByte.GetHashCode();
            }
            if (MShort != 0)
            {
                hash ^= MShort.GetHashCode();
            }
            if (MLong != 0L)
            {
                hash ^= MLong.GetHashCode();
            }
            if (MStr.Length != 0)
            {
                hash ^= MStr.GetHashCode();
            }
            return(hash);
        }
コード例 #2
0
 public void AbsoluteTest(MFloat a, MFloat b)
 {
     Assert.True(a.Absolute() == b);
     Assert.True(a != b.Absolute());
 }
コード例 #3
0
 public void ComparisonTest(MFloat a, MFloat b)
 {
     Assert.True(a < b);
 }
コード例 #4
0
 public void EqualityTest(MFloat a, MFloat b)
 {
     Assert.True(a == b);
 }
コード例 #5
0
 public void AddTest(MFloat a, MFloat b, MFloat c)
 {
     Assert.True(c == a + b);
 }