Tubo! (d_a_obj_tubo) (#95)

* begin work

* fixup modifications to d_a_base header

* progress

* update from main again (forgor to fetch)

* progress

* Basically done

* clean up some inlines

* some at/tg hit typing and tubo naming

* more naming
This commit is contained in:
Elijah Thomas
2024-11-12 22:30:01 -05:00
committed by GitHub
parent 9525f8e9e5
commit 2ecf6509dd
43 changed files with 1335 additions and 193 deletions
+1
View File
@@ -7,6 +7,7 @@
namespace cLib {
s32 targetAngleY(const mVec3_c &target, const mVec3_c &source);
f32 addCalcPosXZ(mVec3_c *src, const mVec3_c &target, f32 scale, f32 maxStep, f32 minStep);
} // namespace cLib
+13
View File
@@ -2,6 +2,9 @@
#define C_LIB_CMATH
#include "common.h"
#include "egg/math/eggMath.h"
#include <cmath.h>
namespace cM {
s16 atan2s(f32, f32);
@@ -24,6 +27,16 @@ inline T minMaxLimit(T val, T min, T max) {
return (T)((T)val < (T)min ? (T)min : ((T)val > (T)max ? (T)max : (T)val));
}
inline bool isZero(f32 val) {
return std::fabsf(val) <= EGG::Math<f32>::epsilon();
}
// When possivle, use the `isZero` func above.
// There are small cases where the result of fabs needs to be used again
inline bool isLessThanZero(f32 val) {
return val <= EGG::Math<f32>::epsilon();
}
} // namespace cM
#endif