From 93812ada7d5cadc399c58aa506913b069d50cd32 Mon Sep 17 00:00:00 2001 From: Michael Krisper <michael.krisper@tugraz.at> Date: Wed, 31 Aug 2016 10:28:32 +0200 Subject: [PATCH] using double.IsNaN again --- VectoCommon/VectoCommon/Utils/SI.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/VectoCommon/VectoCommon/Utils/SI.cs b/VectoCommon/VectoCommon/Utils/SI.cs index 04d232b4fb..791cc3428c 100644 --- a/VectoCommon/VectoCommon/Utils/SI.cs +++ b/VectoCommon/VectoCommon/Utils/SI.cs @@ -1085,8 +1085,7 @@ namespace TUGraz.VectoCommon.Utils Denominator = new Unit[0]; _exponent = 1; - // check for NaN works like this: val != val - if (val != val) { + if (double.IsNaN(val)) { throw new VectoException("NaN [{0}] is not allowed for SI-Values in Vecto.", GetUnitString()); } -- GitLab