From 720ce78d00f6a39e56ea88e9be3f8036a48af182 Mon Sep 17 00:00:00 2001 From: Michael Krisper <michael.krisper@tugraz.at> Date: Mon, 13 Jun 2016 12:38:10 +0200 Subject: [PATCH] faster IsPositive Method --- VectoCommon/VectoCommon/Utils/DoubleExtensionMethods.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VectoCommon/VectoCommon/Utils/DoubleExtensionMethods.cs b/VectoCommon/VectoCommon/Utils/DoubleExtensionMethods.cs index d9329db771..fb05531236 100644 --- a/VectoCommon/VectoCommon/Utils/DoubleExtensionMethods.cs +++ b/VectoCommon/VectoCommon/Utils/DoubleExtensionMethods.cs @@ -139,7 +139,7 @@ namespace TUGraz.VectoCommon.Utils /// <returns></returns> public static bool IsPositive(this double self, double tolerance = Tolerance) { - return self.IsGreaterOrEqual(0.0, tolerance); + return self >= -tolerance; } /// <summary> -- GitLab