Exemple #1
0
        public void ToDoubleReturnsExpectedResult()
        {
            var value  = _fixture.Create <double>();
            var sut    = new Tolerance(value);
            var result = sut.ToDouble();

            Assert.Equal(value, result);
        }
Exemple #2
0
 public bool Equals(Point other, Tolerance tolerance) =>
 Math.Abs(X - other.X) < tolerance.ToDouble() && Math.Abs(Y - other.Y) < tolerance.ToDouble();
Exemple #3
0
 public TolerantDoubleEqualityComparer(Tolerance tolerance)
 {
     _tolerance = tolerance.ToDouble();
 }