41 lines
599 B
C
41 lines
599 B
C
#ifndef HANDMADE_INTRINSICS_H_SENTRY
|
|
#define HANDMADE_INTRINSICS_H_SENTRY
|
|
|
|
/* TODO: Re-implement these functions so we do not have to rely on
|
|
math.h. */
|
|
|
|
#include <math.h>
|
|
|
|
S32 RoundF32toS32(F32 Real32)
|
|
{
|
|
S32 Result = (S32)roundf(Real32);
|
|
return Result;
|
|
}
|
|
|
|
S32 FloorF32toS32(F32 Real32)
|
|
{
|
|
S32 Result = (S32)floorf(Real32);
|
|
return Result;
|
|
}
|
|
|
|
F32 Sin(F32 Angle)
|
|
{
|
|
F32 Result = sinf(Angle);
|
|
return Result;
|
|
}
|
|
|
|
F32 Cos(F32 Angle)
|
|
{
|
|
F32 Result = cosf(Angle);
|
|
return Result;
|
|
}
|
|
|
|
F32 ATan2(F32 Y, F32 X)
|
|
{
|
|
F32 Result = atan2f(Y, X);
|
|
return Result;
|
|
}
|
|
|
|
#endif
|
|
|