diff --git a/include/osg/Math b/include/osg/Math index 12f670f17..48f3abd36 100644 --- a/include/osg/Math +++ b/include/osg/Math @@ -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 +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