Mercurial > hg > svcore
diff base/RangeMapper.h @ 879:eb6b6a88faed
Unit-test RangeMapper, fix a couple of bugs
author | Chris Cannam |
---|---|
date | Fri, 31 Jan 2014 13:39:37 +0000 |
parents | b4a8d8221eaf |
children | b4787b595db3 |
line wrap: on
line diff
--- a/base/RangeMapper.h Wed Dec 11 21:40:27 2013 +0000 +++ b/base/RangeMapper.h Fri Jan 31 13:39:37 2014 +0000 @@ -34,6 +34,12 @@ class LinearRangeMapper : public RangeMapper { public: + /** + * Map values in range minval->maxval linearly into integer range + * minpos->maxpos. minval and minpos must be less than maxval and + * maxpos respectively. If inverted is true, the range will be + * mapped "backwards" (minval to maxpos and maxval to minpos). + */ LinearRangeMapper(int minpos, int maxpos, float minval, float maxval, QString unit = "", bool inverted = false);