25 #ifndef COMMON_MATHS_H 26 #define COMMON_MATHS_H 35 #define M_SQRT1_2 0.70710678118654752440 39 #define M_PI 3.14159265358979323846 51 #define INT32_MIN ((int32) 0x80000000) 55 #define INT32_MAX ((int32) 0x7FFFFFFF) 66 #if defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) 77 return (
sizeof(
unsigned int) * 8 - 1) - __builtin_clz(v);
94 return rad * 180.0f /
M_PI;
98 return deg *
M_PI / 180.0f;
103 #endif // COMMON_MATHS_H
static int intLog2(uint32 v)
const int8 intLog2Table256[256]
Low-level type definitions to handle fixed width types portably.
Low-level detection of architecture/system properties.
static float rad2deg(float rad)
static float deg2rad(float deg)