Mercurial > hg > svcore
diff base/LogRange.h @ 1057:5c5d4863b428 tonioni
Merge from cxx11 branch
author | Chris Cannam |
---|---|
date | Mon, 23 Mar 2015 11:26:28 +0000 |
parents | 31f01931b781 |
children | 667e369cfeab |
line wrap: on
line diff
--- a/base/LogRange.h Mon Mar 23 10:04:48 2015 +0000 +++ b/base/LogRange.h Mon Mar 23 11:26:28 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); };