diff options
| author | Dragorn421 <Dragorn421@users.noreply.github.com> | 2022-07-12 18:17:07 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-12 12:17:07 -0400 |
| commit | 2f07874a5f8e130986a0bd4c46d680ea284e19ea (patch) | |
| tree | 5ab11e9f342c21b4208d8d2515e1befc8aaddd75 /include | |
| parent | c27e292929fa8f958ae4587c4d0b99108a1cedec (diff) | |
Remove `BINANG_SUB` (#1297)
Diffstat (limited to 'include')
| -rw-r--r-- | include/z64math.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/include/z64math.h b/include/z64math.h index ee01602c1..e3cb441bd 100644 --- a/include/z64math.h +++ b/include/z64math.h @@ -76,16 +76,14 @@ typedef struct { /* 0x06 */ s16 yaw; // azimuthal angle } VecSph; // size = 0x08 -#define BINANG_SUB(a, b) ((s16)((a) - (b))) - #define LERP(x, y, scale) (((y) - (x)) * (scale) + (x)) #define LERP32(x, y, scale) ((s32)(((y) - (x)) * (scale)) + (x)) #define LERP16(x, y, scale) ((s16)(((y) - (x)) * (scale)) + (x)) #define F32_LERP(v0,v1,t) ((v0) * (1.0f - (t)) + (v1) * (t)) #define F32_LERPIMP(v0, v1, t) (v0 + ((v1 - v0) * t)) #define F32_LERPIMPINV(v0, v1, t) ((v0) + (((v1) - (v0)) / (t))) -#define BINANG_LERPIMP(v0, v1, t) ((v0) + (s16)(BINANG_SUB((v1), (v0)) * (t))) -#define BINANG_LERPIMPINV(v0, v1, t) ((v0) + BINANG_SUB((v1), (v0)) / (t)) +#define BINANG_LERPIMP(v0, v1, t) ((v0) + (s16)((s16)((v1) - (v0)) * (t))) +#define BINANG_LERPIMPINV(v0, v1, t) ((v0) + (s16)((v1) - (v0)) / (t)) #define VEC3F_LERPIMPDST(dst, v0, v1, t){ \ (dst)->x = (v0)->x + (((v1)->x - (v0)->x) * t); \ |
