Merge branch 'Rainchus:main' into main

This commit is contained in:
CreateSource 2024-01-23 17:18:03 -05:00 committed by GitHub
commit e8af9d5ef4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 141 additions and 139 deletions

View file

@ -79,9 +79,9 @@ f32 BoardPlayerRotYGet(s32);
void BoardPlayerScaleSetV(s32, Vec*);
void BoardPlayerScaleSet(s32, f32, f32, f32);
s16 BoardPlayerCurrMotionGet(s32);
void BoardPlayerMotionCreate(s32, s32);
s32 BoardPlayerMotionCreate(s32, s32);
void BoardPlayerMotionKill(s32, s32);
void BoardPlayerMotionEndCheck(s32);
s32 BoardPlayerMotionEndCheck(s32);
void BoardPlayerMotionEndWait(s32);
void BoardPlayerMotionStart(s32, s32, s32);
void BoardPlayerMotionShiftSet(s32, s32, f32, f32, u32);

View file

@ -7,24 +7,6 @@
#define _MATH_INLINE static inline
#endif
#ifdef MATH_EXPORT_CONST
extern inline float sqrtf(float x)
{
static const double _half=.5;
static const double _three=3.0;
volatile float y;
if(x > 0.0f)
{
double guess = __frsqrte((double)x); // returns an approximation to
guess = _half*guess*(_three - guess*guess*x); // now have 12 sig bits
guess = _half*guess*(_three - guess*guess*x); // now have 24 sig bits
guess = _half*guess*(_three - guess*guess*x); // now have 32 sig bits
y=(float)(x*guess);
return y;
}
return x;
}
#else
extern inline float sqrtf(float x)
{
volatile float y;
@ -39,7 +21,6 @@ extern inline float sqrtf(float x)
}
return x;
}
#endif
double atan(double x);
double copysign(double x, double y);

View file

@ -0,0 +1,8 @@
#ifndef _REL_SQRT_CONSTS
#define _REL_SQRT_CONSTS
const double __fakeHalf = 0.5;
const double __fakeThree = 3.0;
#endif