11// Author: Dominic Beger (Trade/ProgTrade) 2016
2+ // Improvements: Stefan Baumann 2016
23
34namespace SharpMath
45{
@@ -14,7 +15,7 @@ public static class FloatingNumberExtensions
1415 /// <param name="number">The current <see cref="float" />.</param>
1516 /// <param name="other">The other <see cref="float" />.</param>
1617 /// <returns>Returns <c>true</c>, if they are approximately equal, otherwise <c>false</c>.</returns>
17- public static bool AreApproximatelyEqual ( this float number , float other )
18+ public static bool IsApproximatelyEqualTo ( this float number , float other )
1819 => FloatingNumber . AreApproximatelyEqual ( number , other ) ;
1920
2021 /// <summary>
@@ -24,7 +25,7 @@ public static bool AreApproximatelyEqual(this float number, float other)
2425 /// <param name="other">The other <see cref="float" />.</param>
2526 /// <param name="epsilon">The epsilon value that represents the tolerance.</param>
2627 /// <returns>Returns <c>true</c>, if they are approximately equal, otherwise <c>false</c>.</returns>
27- public static bool AreApproximatelyEqual ( this float number , float other , double epsilon )
28+ public static bool IsApproximatelyEqualTo ( this float number , float other , double epsilon )
2829 => FloatingNumber . AreApproximatelyEqual ( number , other , epsilon ) ;
2930
3031 /// <summary>
@@ -34,7 +35,7 @@ public static bool AreApproximatelyEqual(this float number, float other, double
3435 /// <param name="number">The current <see cref="float" />.</param>
3536 /// <param name="other">The other <see cref="float" />.</param>
3637 /// <returns>Returns <c>true</c>, if they are approximately equal, otherwise <c>false</c>.</returns>
37- public static bool AreApproximatelyEqual ( double number , double other )
38+ public static bool IsApproximatelyEqualTo ( this double number , double other )
3839 => FloatingNumber . AreApproximatelyEqual ( number , other ) ;
3940
4041 /// <summary>
@@ -44,7 +45,7 @@ public static bool AreApproximatelyEqual(double number, double other)
4445 /// <param name="other">The other <see cref="float" />.</param>
4546 /// <param name="epsilon">The epsilon value that represents the tolerance.</param>
4647 /// <returns>Returns <c>true</c>, if they are approximately equal, otherwise <c>false</c>.</returns>
47- public static bool AreApproximatelyEqual ( double number , double other , double epsilon )
48+ public static bool IsApproximatelyEqualTo ( this double number , double other , double epsilon )
4849 => FloatingNumber . AreApproximatelyEqual ( number , other , epsilon ) ;
4950 }
5051}
0 commit comments