mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-05-23 06:34:18 -04:00
22 lines
407 B
C
22 lines
407 B
C
#include "sys_math.h"
|
|
#include "libultra/libultra.h"
|
|
#include "libc64/qrand.h"
|
|
#include "libc/math.h"
|
|
|
|
|
|
void init_rnd(){
|
|
sqrand(osGetCount());
|
|
}
|
|
|
|
f32 sinf_table(f32 x){
|
|
f32 max = 3.05185094476e-05f;
|
|
s16 sinf = sins((s16)(10430.0595703f * x));
|
|
return sinf * max;
|
|
}
|
|
|
|
f32 cosf_table(f32 x){
|
|
f32 max = 3.05185094476e-05f;
|
|
s16 cosf = coss((s16)(10430.0595703f * x));
|
|
return cosf * max;
|
|
}
|