sys_math, cosf OK and documented, sinf, coss, sins documented (#289)

* OK, data imported, document

* spec

* Match cosf, document sinf and cosf

* Some more documentation, switch fu back

* Format

* Little more documentation

* Document coss too

* Move macros

* Review, add some .s

* Fix headers, review
This commit is contained in:
EllipticEllipsis
2021-09-27 17:41:07 -04:00
committed by GitHub
parent 039fc4623e
commit c72b5788a3
12 changed files with 221 additions and 64 deletions
+2
View File
@@ -1,6 +1,8 @@
#ifndef _ULTRA64_CONVERT_H_
#define _ULTRA64_CONVERT_H_
#include "stdint.h"
#define OS_CLOCK_RATE 62500000LL
#define OS_CPU_COUNTER (OS_CLOCK_RATE*3/4)
+3 -3
View File
@@ -3269,9 +3269,9 @@ void Check_ClearRGBA16(s16* buffer);
// void Check_DrawRegionLockErrorMessage(void);
// void Check_ExpansionPak(void);
// void Check_RegionIsSupported(void);
f32 func_80179300(f32 param_1);
f32 func_80179400(s32 param_1);
f32 pow_int(f32 x, s32 pow);
f32 func_80179300(f32 n);
f32 func_80179400(s32 n);
f32 pow_int(f32 base, s32 exp);
f32 sin_rad(f32 rad);
f32 cos_rad(f32 rad);
f32 Rand_ZeroFloat(f32 scale);
+4 -1
View File
@@ -1,8 +1,9 @@
#ifndef _MACROS_H_
#define _MACROS_H_
#include "convert.h"
#include "stdint.h"
#include "convert.h"
#include "z64.h"
#define ARRAY_COUNT(arr) (s32)(sizeof(arr) / sizeof(arr[0]))
#define ARRAY_COUNTU(arr) (u32)(sizeof(arr) / sizeof(arr[0]))
@@ -116,6 +117,8 @@ extern GraphicsContext* __gfxCtx;
#define CLAMP_MAX(x, max) ((x) > (max) ? (max) : (x))
#define CLAMP_MIN(x, min) ((x) < (min) ? (min) : (x))
#define ROUND(x) (s32)(((x) >= 0.0) ? ((x) + 0.5) : ((x) - 0.5))
#define SWAP(type, a, b) \
{ \
type _temp = (a); \
+1 -2
View File
@@ -12,12 +12,11 @@
#define DEGTORAD(x) ((x) * (M_PI / 180.0f))
typedef union {
f64 d;
struct {
u32 hi;
u32 lo;
} word;
f64 d;
} du;
typedef union {
+1 -1
View File
@@ -1670,7 +1670,7 @@ extern PadMgr* padmgrContext;
// extern UNK_TYPE4 controllerInputsCaptured;
// extern UNK_TYPE4 D_801D1538;
extern UNK_PTR D_801D1540;
extern f32 D_801D1570[13];
// extern f32 sFactorialTbl[13];
extern Vec3f D_801D15B0;
extern Vec3s D_801D15BC;
extern RSPMatrix D_801D1DE0;