changeset 2239:66b79075ac58 default tip

reverted changeset fc8be07bc72a
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sun, 27 Apr 2025 20:55:48 +0200 (2 weeks ago)
parents fc8be07bc72a
children
files OrthancStone/Sources/Toolbox/LinearAlgebra.h
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancStone/Sources/Toolbox/LinearAlgebra.h	Sun Apr 27 20:30:29 2025 +0200
+++ b/OrthancStone/Sources/Toolbox/LinearAlgebra.h	Sun Apr 27 20:55:48 2025 +0200
@@ -179,11 +179,13 @@
                        double y)
     {
       /**
-       * The default threshold was relaxed in releases > 2.6 of the
-       * Stone Web viewer, as it might be the source of an issue with
-       * arm64, ppc64el, riscv64, and s390x, cf. Debian #110404
+       * As most input is read as single-precision numbers, we take the
+       * epsilon machine for float32 into consideration to compare numbers.
+       *
+       * NB: This threshold *might* (but not sure!) be the source of an
+       * issue with arm64, ppc64el, riscv64, and s390x, cf. Debian #110404
        **/
-      return IsNear(x, y, 100.0 * std::numeric_limits<double>::epsilon());
+      return IsNear(x, y, 10.0 * std::numeric_limits<float>::epsilon());
     }
 
     inline bool IsCloseToZero(double x)