Add a soft bounds check for range::normalise

This commit is contained in:
Danny Robson 2012-05-24 17:07:17 +10:00
parent b86cc6904f
commit f3b829e232

View File

@ -90,6 +90,7 @@ range<T>::expand (T val) {
template <typename T>
double
range<T>::normalise (T val) const {
CHECK_SOFT (val >= min && val <= max);
return ((double)val - min) /
((double)max - min);
}