59 #ifndef FOXBMS__FOXMATH_H_
60 #define FOXBMS__FOXMATH_H_
74 #define UNIT_CONVERSION_FACTOR_1000_INTEGER (1000)
75 #define UNIT_CONVERSION_FACTOR_10_FLOAT (10.0f)
76 #define UNIT_CONVERSION_FACTOR_100_FLOAT (100.0f)
77 #define UNIT_CONVERSION_FACTOR_1000_FLOAT (1000.0f)
108 const float x_interpolate);
int32_t MATH_AbsInt32_t(const int32_t value)
Returns the absolute value of passed int32_t value.
float MATH_LinearInterpolation(const float x1, const float y1, const float x2, const float y2, const float x_interpolate)
Linear inter-/extrapolates a third point according to two given points.
uint16_t MATH_SwapBytesUint16_t(const uint16_t val)
Swap bytes of uint16_t value.
int64_t MATH_AbsInt64_t(const int64_t value)
Returns the absolute value of passed int64_t value.
uint16_t MATH_MinimumOfTwoUint16_t(const uint16_t value1, const uint16_t value2)
Returns the minimum of the passed uint16_t values.
uint32_t MATH_SwapBytesUint32_t(const uint32_t val)
Swap bytes of uint32_t value.
void MATH_StartupSelfTest(void)
: self test for math functions that can be called at startup
uint8_t MATH_MinimumOfTwoUint8_t(const uint8_t value1, const uint8_t value2)
Returns the minimum of the passed uint8_t values.
float MATH_MinimumOfTwoFloats(const float value1, const float value2)
Returns the minimum of the passed float values.
uint64_t MATH_SwapBytesUint64_t(const uint64_t val)
Swap bytes of uint64_t value.
General macros and definitions for the whole platform.