public void CanCheck_Equality() { const double a = 3.3; const double b = 2.2; const double c = 4.11; const double d = 1.344; var ptA = new Point4d(a, b, c, d); var expectedEqual = new Point4d(a + Settings.Tolerance / 2, b, c, d); var expectedNotEqual = new Point4d(a + Settings.Tolerance * 2, b, c, d); Assert.True(ptA == expectedEqual); Assert.Equal(ptA.GetHashCode(), expectedEqual.GetHashCode()); Assert.True(ptA != expectedNotEqual); Assert.NotEqual(ptA.GetHashCode(), expectedNotEqual.GetHashCode()); Assert.False(ptA == null); }