diff options
Diffstat (limited to 'gendarme/rules/Gendarme.Rules.Correctness/AvoidFloatingPointEqualityRule.cs')
-rw-r--r-- | gendarme/rules/Gendarme.Rules.Correctness/AvoidFloatingPointEqualityRule.cs | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/gendarme/rules/Gendarme.Rules.Correctness/AvoidFloatingPointEqualityRule.cs b/gendarme/rules/Gendarme.Rules.Correctness/AvoidFloatingPointEqualityRule.cs index e62b52b0..8fb8e61c 100644 --- a/gendarme/rules/Gendarme.Rules.Correctness/AvoidFloatingPointEqualityRule.cs +++ b/gendarme/rules/Gendarme.Rules.Correctness/AvoidFloatingPointEqualityRule.cs @@ -65,17 +65,17 @@ namespace Gendarme.Rules.Correctness { /// // work as expected. /// public static bool NearlyEqual (double [] lhs, double [] rhs) /// { - /// if (ReferenceEquals (lhs, rhs)) + /// if (ReferenceEquals (lhs, rhs)) { /// return true; - /// - /// if (lhs.Length != rhs.Length) + /// } + /// if (lhs.Length != rhs.Length) { /// return false; - /// + /// } /// for (int i = 0; i < lhs.Length; ++i) { - /// if (lhs [i] != rhs [i]) + /// if (lhs [i] != rhs [i]) { /// return false; + /// } /// } - /// /// return true; /// } /// </code> @@ -89,17 +89,17 @@ namespace Gendarme.Rules.Correctness { /// // be scaled accordingly). /// public static bool NearlyEqual (double [] lhs, double [] rhs, double epsilon) /// { - /// if (ReferenceEquals (lhs, rhs)) + /// if (ReferenceEquals (lhs, rhs)) { /// return true; - /// - /// if (lhs.Length != rhs.Length) + /// } + /// if (lhs.Length != rhs.Length) { /// return false; - /// + /// } /// for (int i = 0; i < lhs.Length; ++i) { - /// if (Math.Abs (lhs [i] - rhs [i]) > epsilon) + /// if (Math.Abs (lhs [i] - rhs [i]) > epsilon) { /// return false; + /// } /// } - /// /// return true; /// } /// </code> |