mirror of
https://github.com/zeldaret/tp
synced 2026-05-25 23:35:23 -04:00
901b222eb8
* JUTException inherit JKRThread * OK __ct__12JUTExceptionFP14JUTDirectPrint * OK create__12JUTExceptionFP14JUTDirectPrint * OK setFPException__12JUTExceptionFUl * OK showFloatSub__12JUTExceptionFif * OK showFloat__12JUTExceptionFP9OSContext * OK searchPartialModule__12JUTExceptionFUlPUlPUlPUlPUl * OK search_name_part__FPUcPUci * OK showStack__12JUTExceptionFP9OSContext * OK showMainInfo__12JUTExceptionFUsP9OSContextUlUl * OK showGPR__12JUTExceptionFP9OSContext * OK __sinit_JUTException_cpp * OK showMapInfo_subroutine__12JUTExceptionFUlb * OK showGPRMap__12JUTExceptionFP9OSContext * OK showSRR0Map__12JUTExceptionFP9OSContext * OK printDebugInfo__12JUTExceptionFQ212JUTException9EInfoPageUsP9OSContextUlUl * OK isEnablePad__12JUTExceptionCFv * OK readPad__12JUTExceptionFPUlPUl * NONMATCHING printContext__12JUTExceptionFUsP9OSContextUlUl * OK printContext__12JUTExceptionFUsP9OSContextUlUl * OK __dt__12JUTExceptionFv * OK waitTime__12JUTExceptionFl * OK createFB__12JUTExceptionFv * OK setPreUserCallback__12JUTExceptionFPFUsP9OSContextUlUl_v * OK __ct__13JUTExternalFBFP16_GXRenderModeObj8_GXGammaPvUl * OK createConsole__12JUTExceptionFPvUl * NONMATCHING queryMapAddress_single__12JUTExceptionFPcUllPUlPUlPcUlbb * OK queryMapAddress__12JUTExceptionFPcUllPUlPUlPcUlbb * OK appendMapFile__12JUTExceptionFPCc * clean up * OK panic_f__12JUTExceptionFPCciPCce * OK panic_f_va__12JUTExceptionFPCciPCcP16__va_list_struct * OK errorHandler__12JUTExceptionFUsP9OSContextUlUl * format * format * fixed requested changes * merged with master and removed *.s files Co-authored-by: Julgodis <>
71 lines
1.3 KiB
C
71 lines
1.3 KiB
C
#ifndef MSL_MATH_H_
|
|
#define MSL_MATH_H_
|
|
|
|
#include "MSL_C.PPCEABI.bare.H/MSL_Common/Src/float.h"
|
|
#include "dolphin/types.h"
|
|
|
|
extern "C" {
|
|
s32 abs(s32);
|
|
f64 acos(f64);
|
|
f32 acosf(f32);
|
|
f64 asin(f64);
|
|
f64 atan(f64);
|
|
f64 atan2(f64);
|
|
f64 ceil(f64);
|
|
f64 copysign(f64, f64);
|
|
f64 cos(f64);
|
|
f32 cosf(f32);
|
|
f64 exp(f64);
|
|
|
|
extern f32 __fabsf(f32);
|
|
inline f64 fabs(f64 f) {
|
|
return __fabsf(f);
|
|
}
|
|
inline f64 fabsf2(f32 f) {
|
|
return __fabsf(f);
|
|
}
|
|
inline f32 fabsf(f32 f) {
|
|
return fabsf2(f);
|
|
}
|
|
|
|
f64 floor(f64);
|
|
f64 fmod(f64, f64);
|
|
inline f32 fmodf(f32 f1, f32 f2) {
|
|
return fmod(f1, f2);
|
|
}
|
|
|
|
f64 frexp(f64, s32*);
|
|
f64 ldexp(f64, s32);
|
|
f64 modf(f64, f64*);
|
|
f64 pow(f64, f64);
|
|
f64 sin(f64);
|
|
f32 sinf(f32);
|
|
f64 sqrt(f64);
|
|
f64 tan(f64);
|
|
f32 tanf(f32);
|
|
|
|
extern f32 __float_nan[4];
|
|
extern f32 __float_epsilon[4];
|
|
|
|
inline f64 sqrt_step(f64 tmpd, f32 mag) {
|
|
return tmpd * 0.5 * (3.0 - mag * (tmpd * tmpd));
|
|
}
|
|
|
|
inline f32 sqrtf(f32 mag) {
|
|
if (mag > 0.0f) {
|
|
f64 tmpd = __frsqrte(mag);
|
|
tmpd = sqrt_step(tmpd, mag);
|
|
tmpd = sqrt_step(tmpd, mag);
|
|
tmpd = sqrt_step(tmpd, mag);
|
|
return mag * tmpd;
|
|
} else if (mag < 0.0) {
|
|
return __float_nan[0];
|
|
} else if (fpclassify(mag) == 1) {
|
|
return __float_nan[0];
|
|
} else {
|
|
return mag;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endif |