changeset 3684:3971ec6b1f72

fix for older compilers
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 24 Feb 2020 17:30:20 +0100
parents 12253ddefe5a
children 2cc34837d694
files Core/Images/ImageProcessing.cpp
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/Core/Images/ImageProcessing.cpp	Mon Feb 24 17:19:37 2020 +0100
+++ b/Core/Images/ImageProcessing.cpp	Mon Feb 24 17:30:20 2020 +0100
@@ -1413,14 +1413,14 @@
         return;
 
       case PixelFormat_Float32:
-        // "::min()" must be replaced by "::lowest()" if dealing with float or double
+        // "::min()" must be replaced by "::lowest()" or "-::max()" if dealing with float or double.
         if (useRound)
         {
-          ShiftScaleInternal<float, float, true, false>(image, image, a, b, std::numeric_limits<float>::lowest());
+          ShiftScaleInternal<float, float, true, false>(image, image, a, b, -std::numeric_limits<float>::max());
         }
         else
         {
-          ShiftScaleInternal<float, float, false, false>(image, image, a, b, std::numeric_limits<float>::lowest());
+          ShiftScaleInternal<float, float, false, false>(image, image, a, b, -std::numeric_limits<float>::max());
         }
         return;