util: add wrappers for float math functions on windows
This commit is contained in:
parent
b6c9d2ef2c
commit
f30f320612
|
@ -402,6 +402,52 @@ extern void pipe_copy_rect(ubyte * dst, unsigned cpp, unsigned dst_pitch,
|
|||
int src_pitch, unsigned src_x, int src_y);
|
||||
|
||||
|
||||
|
||||
#ifdef WIN32
|
||||
|
||||
static INLINE float cosf( float f )
|
||||
{
|
||||
return (float) cos( (double) f );
|
||||
}
|
||||
|
||||
static INLINE float sinf( float f )
|
||||
{
|
||||
return (float) sin( (double) f );
|
||||
}
|
||||
|
||||
static INLINE float ceilf( float f )
|
||||
{
|
||||
return (float) ceil( (double) f );
|
||||
}
|
||||
|
||||
static INLINE float floorf( float f )
|
||||
{
|
||||
return (float) floor( (double) f );
|
||||
}
|
||||
|
||||
static INLINE float powf( float f, float g )
|
||||
{
|
||||
return (float) pow( (double) f, (double) g );
|
||||
}
|
||||
|
||||
static INLINE float sqrtf( float f )
|
||||
{
|
||||
return (float) sqrt( (double) f );
|
||||
}
|
||||
|
||||
static INLINE float fabsf( float f )
|
||||
{
|
||||
return (float) fabs( (double) f );
|
||||
}
|
||||
|
||||
static INLINE float logf( float f )
|
||||
{
|
||||
return (float) cos( (double) f );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue