Add a soft bounds check for range::normalise
This commit is contained in:
parent
b86cc6904f
commit
f3b829e232
@ -90,6 +90,7 @@ range<T>::expand (T val) {
|
|||||||
template <typename T>
|
template <typename T>
|
||||||
double
|
double
|
||||||
range<T>::normalise (T val) const {
|
range<T>::normalise (T val) const {
|
||||||
|
CHECK_SOFT (val >= min && val <= max);
|
||||||
return ((double)val - min) /
|
return ((double)val - min) /
|
||||||
((double)max - min);
|
((double)max - min);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user