mirror of
https://github.com/zeldaret/ss
synced 2026-09-03 01:54:18 -04:00
porgress
This commit is contained in:
+9
-1
@@ -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
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user