Files
ss/include/m/m_angle.h
T
robojumper 3829ee6d48 Rough dynamic collision setup (#24)
* Rough collider shape setup

* d_a_obj_toD3_stone_figure OK

* Cleanup

* Cleanup 2
2024-09-27 18:19:00 -04:00

56 lines
922 B
C++

#ifndef M_ANGLE_H
#define M_ANGLE_H
#include <common.h>
#include <nw4r/math/math_triangular.h>
struct mAng {
mAng() {}
mAng(s16 s) : mVal(s) {}
mAng(const mAng &other) : mVal(other.mVal) {}
operator s16() const {
return mVal;
}
s32 step(s16 target, s32 steps, s16 max, s16 min);
inline f32 sin() const {
return nw4r::math::SinIdx(*this);
}
inline f32 cos() const {
return nw4r::math::CosIdx(*this);
}
s16 mVal;
};
class mAng3_c {
public:
mAng3_c() {}
mAng3_c(s16 fx, s16 fy, s16 fz) : x(fx), y(fy), z(fz) {}
mAng3_c(const mAng3_c &r) {
*this = r;
}
mAng3_c &operator=(const mAng3_c &r) {
x = r.x;
y = r.y;
z = r.z;
return *this;
}
void set(s16 fx, s16 fy, s16 fz) {
x = fx;
y = fy;
z = fz;
}
mAng x, y, z;
static mAng3_c Zero;
};
#endif