mirror of
https://github.com/zeldaret/ss
synced 2026-09-06 18:51:12 -04:00
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:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user