#include <LogRange.h>
Definition at line 19 of file LogRange.h.
Static Public Member Functions | |
| static void | mapRange (float &min, float &max, float thresh=-10) |
| Map a linear range onto a logarithmic range. | |
| static float | map (float value, float thresh=-10) |
| Map a value onto a logarithmic range. | |
| static float | unmap (float value) |
| Map a value from the logarithmic range back again. | |
| void LogRange::mapRange | ( | float & | min, | |
| float & | max, | |||
| float | thresh = -10 | |||
| ) | [static] |
Map a linear range onto a logarithmic range.
min and max are passed as the extents of the linear range and returned as the extents of the logarithmic range. thresh is the minimum value for the log range, to be used if the linear range spans zero.
Definition at line 22 of file LogRange.cpp.
Referenced by Colour3DPlotLayer::fillCache(), TimeValueLayer::getColourForValue(), TimeValueLayer::getScaleExtents(), and NoteLayer::getScaleExtents().
| float LogRange::map | ( | float | value, | |
| float | thresh = -10 | |||
| ) | [static] |
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.
Definition at line 55 of file LogRange.cpp.
Referenced by Colour3DPlotLayer::fillCache(), TimeValueLayer::getColourForValue(), TimeValueLayer::getYForValue(), and NoteLayer::getYForValue().
| float LogRange::unmap | ( | float | value | ) | [static] |
Map a value from the logarithmic range back again.
This just means taking the value'th power of ten.
Definition at line 62 of file LogRange.cpp.
1.5.1