diff base/LogRange.h @ 1044:31f01931b781 cxx11

Move to using double rather than float for floating-point calculations (float only for storage); more build fixes
author Chris Cannam
date Mon, 09 Mar 2015 12:02:10 +0000
parents 06f13a3b9e9e
children 667e369cfeab
line wrap: on
line diff
--- a/base/LogRange.h	Wed Mar 04 19:08:21 2015 +0000
+++ b/base/LogRange.h	Mon Mar 09 12:02:10 2015 +0000
@@ -28,27 +28,27 @@
      * extents of the logarithmic range.  thresh is the minimum value
      * for the log range, to be used if the linear range spans zero.
      */
-    static void mapRange(float &min, float &max, float thresh = -10);
+    static void mapRange(double &min, double &max, double thresh = -10);
 
     /**
      * Map a value onto a logarithmic range.  This just means taking
      * the base-10 log of the absolute value, or using the threshold
      * value if the absolute value is zero.
      */
-    static float map(float value, float thresh = -10);
+    static double map(double value, double thresh = -10);
 
     /**
      * Map a value from the logarithmic range back again.  This just
      * means taking the value'th power of ten.
      */
-    static float unmap(float value);
+    static double unmap(double value);
 
     /**
      * Estimate whether a set of values would be more properly shown
      * using a logarithmic than a linear scale.  This is only ever
      * going to be a rough guess.
      */
-    static bool useLogScale(std::vector<float> values);
+    static bool useLogScale(std::vector<double> values);
 
 };