mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-07-07 20:11:51 -04:00
work on libc64
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#ifndef W_MATH_H
|
||||
#define W_MATH_H
|
||||
#include "types.h"
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
f64 atan2(f64, f64);
|
||||
f64 acos(f32);
|
||||
|
||||
#endif
|
||||
@@ -4,4 +4,9 @@
|
||||
#include "types.h"
|
||||
s16 sins(u16);
|
||||
|
||||
f32 fatan2(f32, f32);
|
||||
|
||||
f64 fsqrt(f32);
|
||||
|
||||
f32 facos(f32);
|
||||
#endif
|
||||
@@ -0,0 +1,11 @@
|
||||
#ifndef LQRAND_H
|
||||
#define LQRAND_H
|
||||
|
||||
#include "types.h"
|
||||
|
||||
u32 qrand(void);
|
||||
void sqrand(u32);
|
||||
f32 fqrand(void);
|
||||
f64 fqrand2(void);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,8 @@
|
||||
#ifndef LDEBUG_H
|
||||
#define LDEBUG_H
|
||||
|
||||
#include "types.h"
|
||||
|
||||
void _dbg_hungup(const char*, s32);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,13 @@
|
||||
#ifndef LOS_THREAD_H
|
||||
#define LOS_THREAD_H
|
||||
|
||||
#include "types.h"
|
||||
#include "dolphin/OSThread.h"
|
||||
typedef s32 OSPri;
|
||||
typedef s32 OSId;
|
||||
|
||||
|
||||
|
||||
OSId osGetThreadId(OSThread*);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user