Added an osg::absolute template function into osg/Math.
This commit is contained in:
parent
18ab95a294
commit
559f5f93e5
@ -108,6 +108,11 @@ const double PI = 3.14159265358979323846;
|
||||
const double PI_2 = 1.57079632679489661923;
|
||||
const double PI_4 = 0.78539816339744830962;
|
||||
|
||||
/** return the minimum of two values, equivilant to std::min.
|
||||
* std::min not used because of STL implementation under IRIX contains no std::min.*/
|
||||
template<typename T>
|
||||
inline T absolute(T v) { return v<(T)0?-v:v; }
|
||||
|
||||
/** return the minimum of two values, equivilant to std::min.
|
||||
* std::min not used because of STL implementation under IRIX contains no std::min.*/
|
||||
template<typename T>
|
||||
|
Loading…
Reference in New Issue
Block a user