This commit is contained in:
elijah-thomas774
2025-11-16 23:19:57 -05:00
parent 1e29b7940c
commit 54c3f67bdf
20 changed files with 526 additions and 77 deletions
+9 -1
View File
@@ -6,6 +6,7 @@
#include "m/m_vec.h"
#include "math.h"
#include "nw4r/math/math_triangular.h"
#include "s/s_Math.h"
struct mAng {
mAng() {}
@@ -35,6 +36,9 @@ struct mAng {
void set(s16 val) {
mVal = val;
}
void setF(const f32 &val) {
mVal = val;
}
s16 *ref() {
return &mVal;
@@ -65,6 +69,10 @@ struct mAng {
return *this;
}
s32 absDiff(const mAng &other) const {
return sLib::absDiff(mVal, other.mVal);
}
static s32 abs(const mAng b) {
return labs(b);
}
@@ -98,7 +106,7 @@ struct mAng {
return mVal * sAngToRad;
}
static s16 fromRad(f32 rad) {
static mAng fromRad(f32 rad) {
return rad * sRadToAng;
}
+6 -2
View File
@@ -147,11 +147,15 @@ public:
MTXMultVecSR(*this, in, out);
}
mVec3_c multVecSR(const mVec3_c &v) const {
mVec3_c ret = v;
MTXMultVecSR(*this, ret, ret);
mVec3_c ret;
multVecSR(v, ret);
return ret;
}
void multVecSR(mVec3_c &v) const {
multVecSR(v, v);
}
mMtx_c &operator+=(const mMtx_c &rhs) {
MTXConcat(*this, rhs, *this);
return *this;