Files
ss/include/c/c_math.h
T
Elijah Thomas c235e32d95 d_a_obj_tumble_weed mostly done (#88)
* mostly done

* Update d_t_tumble_weed.cpp

* remove cM::calcTimer

* just regswap on adjustSpeed

* Create inlines for angle between vectors

* name data symbols

---------

Co-authored-by: robojumper <robojumper@gmail.com>
2024-11-06 16:36:17 -05:00

22 lines
365 B
C++

#ifndef C_LIB_CMATH
#define C_LIB_CMATH
#include "common.h"
namespace cM {
s16 atan2s(f32, f32);
void initRnd(s32);
f32 rnd();
int rndInt(int max);
f32 rndF(f32 max);
f32 rndFX(f32 amp);
template <typename T>
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));
}
} // namespace cM
#endif