|
MorphoGraphX
|
Defines the util::clamp function. More...
#include <Config.hpp>Go to the source code of this file.
Namespaces | |
| mgx | |
| This namespace contains all the API of MorphoGraphX. | |
Functions | |
| template<class T > | |
| T | mgx::util::clamp (const T &val, const T &min, const T &max) |
| A function to clamp a value to a range. More... | |
Defines the util::clamp function.
| T mgx::util::clamp | ( | const T & | val, |
| const T & | min, | ||
| const T & | max | ||
| ) |
A function to clamp a value to a range.
| val | The start value. |
| min | The minimum value of the range. |
| max | The maximum value of the range. |
If min is more than max, the function returns max.
1.8.11