mirror of
https://github.com/ethteck/kh1.git
synced 2025-02-18 15:17:37 +00:00
16 lines
397 B
C
16 lines
397 B
C
#include "common.h"
|
|
|
|
// Kingdom Hearts universally uses a slightly incorrect value for Pi (3.1415927)
|
|
#define PI 3.1415928f
|
|
|
|
f32 cosf(f32);
|
|
f32 atan2f(f32, f32);
|
|
|
|
/// inline asm sqrt to bypass fastmath flag, avoids optimizations not present in final binary
|
|
static inline f32 _sqrtf(f32 arg) {
|
|
f32 result;
|
|
|
|
__asm__ volatile("sqrt.s %0, %1" : "=f"(result) : " f"(arg));
|
|
return result;
|
|
}
|