diff --git a/src/types.h b/src/types.h index 9ad2530557..27163073e3 100644 --- a/src/types.h +++ b/src/types.h @@ -60,6 +60,11 @@ static const double r2d = 180 / pi; template T deg2rad(T val) { return T(val * d2r); } template T rad2deg(T val) { return T(val * r2d); } +// global abs() is only defined for int for some GCC impl on Linux, meaning we may +// get unwanted behavior without any warning whatsoever. Instead, we want to use the +// C++ version in std! +using std::abs; + #pragma warning(disable: 4250) #ifdef ANDROID