mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-05-24 06:50:45 -04:00
29 lines
492 B
C
29 lines
492 B
C
#include "sys_math.h"
|
|
#include "libultra/libultra.h"
|
|
#include "libc64/qrand.h"
|
|
#include "libc64/math64.h"
|
|
|
|
extern void init_rnd() {
|
|
sqrand(osGetCount());
|
|
}
|
|
|
|
#ifdef MUST_MATCH
|
|
FORCESTRIP static f32 _rodata_order(int in) {
|
|
return (f32)in;
|
|
}
|
|
#endif
|
|
|
|
extern f32 sinf_table(f32 x) {
|
|
s16 v = (SHT_MAX / M_PI) * x;
|
|
s16 sin = sins(v);
|
|
|
|
return sin * SHT_MINV;
|
|
}
|
|
|
|
extern f32 cosf_table(f32 x) {
|
|
s16 v = (SHT_MAX / M_PI) * x;
|
|
s16 cos = coss(v);
|
|
|
|
return cos * SHT_MINV;
|
|
}
|