diff --git a/range.cpp b/range.cpp index 240af69d..f0c74195 100644 --- a/range.cpp +++ b/range.cpp @@ -107,7 +107,6 @@ range::expand (T val) { template double range::normalise (T val) const { - CHECK_SOFT (val >= min && val <= max); return ((double)val - min) / ((double)max - min); } diff --git a/range.hpp b/range.hpp index 396a2dc0..e1ab4169 100644 --- a/range.hpp +++ b/range.hpp @@ -49,7 +49,9 @@ namespace util { /// Expand the range to include this value if necessary void expand (T val); - /// Normalise a number to [0, 1] within the range. Does not check bounds. + /// Normalise a number to [0, 1] within the range. Does not check + /// bounds, it is the caller's responsibility to clamp the result if + /// needed. double normalise (T val) const; range& operator*= (T);