SPH
|
Object representing interval of real values. More...
Go to the source code of this file.
Classes | |
class | Interval |
Object representing a 1D interval of real numbers. More... | |
Functions | |
template<typename T > | |
INLINE T | clamp (const T &v, const Interval &range) |
template<typename T > | |
INLINE Pair< T > | clampWithDerivative (const T &, const T &, const Interval &) |
Returns clamped values and the value of derivative. More... | |
template<> | |
INLINE Pair< Float > | clampWithDerivative< Float > (const Float &v, const Float &dv, const Interval &range) |
Overload of clamp method using range instead of lower and upper bound as values. Can be used by other Floats by specializing the method
Definition at line 120 of file Interval.h.
INLINE Pair<T> clampWithDerivative | ( | const T & | , |
const T & | , | ||
const Interval & | |||
) |
Returns clamped values and the value of derivative.
The function is specialized for floats, returning zero derivative if the value is outside range.
Definition at line 129 of file Interval.h.
INLINE Pair<Float> clampWithDerivative< Float > | ( | const Float & | v, |
const Float & | dv, | ||
const Interval & | range | ||
) |
Definition at line 134 of file Interval.h.