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); }
public void AbsoluteTest(MFloat a, MFloat b) { Assert.True(a.Absolute() == b); Assert.True(a != b.Absolute()); }
public void ComparisonTest(MFloat a, MFloat b) { Assert.True(a < b); }
public void EqualityTest(MFloat a, MFloat b) { Assert.True(a == b); }
public void AddTest(MFloat a, MFloat b, MFloat c) { Assert.True(c == a + b); }