Files
tp/include/JSystem/JMath/JMath.h
T

30 lines
510 B
C++
Raw Normal View History

2021-03-28 22:49:05 +02:00
#ifndef JMATH_H
#define JMATH_H
2021-10-11 09:38:53 -07:00
#include "dolphin/mtx/mtx.h"
#include "dolphin/types.h"
2021-10-11 09:38:53 -07:00
void JMAMTXApplyScale(const Mtx, Mtx, f32, f32, f32);
inline f32 JMAFastReciprocal(f32 value) {
return __fres(value);
}
2021-11-10 23:54:31 -08:00
inline f32 JMAFastSqrt(f32 input) {
if (input > 0.0f) {
f64 tmp = __frsqrte(input);
return tmp * input;
}
return input;
}
2021-10-11 09:38:53 -07:00
namespace JMath {
inline f32 fastReciprocal(f32 value) {
return JMAFastReciprocal(value);
}
}; // namespace JMath
2021-03-28 22:49:05 +02:00
#endif /* JMATH_H */