10 #define M_PI (3.14159265358979323846)
13 #define F_PI (3.14159265358979323846f)
14 #define F_PI_2 (1.57079632679489661923f)
15 #define F_TAU (6.28318530717958647692f)
18 #define FLT_EPSILON (1.19209290e-07f)
21 #define SQRT_2 1.41421356237309504880
22 #define SQRT_3 1.73205080756887719318
24 #define SQRTF_2 1.41421356237309504880f
25 #define SQRTF_3 1.73205080756887719318f
28 static const union msvc_inf_hack
{
31 } msvc_inf_union
= {{ 0x00, 0x00, 0x80, 0x7F }};
32 #define HUGE_VALF (msvc_inf_union.f)
36 static inline float log2f(float f
)
38 return logf(f
) / logf(2.0f
);
43 static inline float cbrtf(float f
)
45 return powf(f
, 1.0f
/3.0f
);
49 #ifndef HAVE_COPYSIGNF
50 static inline float copysignf(float x
, float y
)
55 } ux
= { x
}, uy
= { y
};
57 ux
.u
|= (uy
.u
&0x80000000u
);
62 #define DEG2RAD(x) ((float)(x) * (float)(M_PI/180.0))
63 #define RAD2DEG(x) ((float)(x) * (float)(180.0/M_PI))
65 #endif /* AL_MATH_DEFS_H */