mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-07-16 10:02:59 -07:00
git subrepo clone https://github.com/HarbourMasters/soh.git
subrepo: subdir: "soh" merged: "ba904bbd0" upstream: origin: "https://github.com/HarbourMasters/soh.git" branch: "master" commit: "ba904bbd0" git-subrepo: version: "0.4.1" origin: "???" commit: "???"
This commit is contained in:
parent
0bb0e7b53b
commit
39cc86c260
2466 changed files with 451557 additions and 0 deletions
29
soh/include/libc/math.h
Normal file
29
soh/include/libc/math.h
Normal file
|
@ -0,0 +1,29 @@
|
|||
#ifndef MATH_H
|
||||
#define MATH_H
|
||||
|
||||
#include "ultra64/types.h"
|
||||
|
||||
#define M_PI 3.14159265358979323846f
|
||||
#define M_SQRT2 1.41421356237309504880f
|
||||
#define FLT_MAX 340282346638528859811704183484516925440.0f
|
||||
#define SHT_MAX 32767.0f
|
||||
#define SHT_MINV (1.0f / SHT_MAX)
|
||||
#define DEGTORAD(x) (x * M_PI / 180.0f)
|
||||
|
||||
typedef union {
|
||||
struct {
|
||||
u32 hi;
|
||||
u32 lo;
|
||||
} word;
|
||||
|
||||
f64 d;
|
||||
} du;
|
||||
|
||||
typedef union {
|
||||
u32 i;
|
||||
f32 f;
|
||||
} fu;
|
||||
|
||||
extern f32 __libm_qnan_f;
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue