summaryrefslogtreecommitdiff
path: root/include/JSystem/JMath
diff options
context:
space:
mode:
Diffstat (limited to 'include/JSystem/JMath')
-rw-r--r--include/JSystem/JMath/JMath.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/JSystem/JMath/JMath.h b/include/JSystem/JMath/JMath.h
index d71f5de5e7..cb252d9aea 100644
--- a/include/JSystem/JMath/JMath.h
+++ b/include/JSystem/JMath/JMath.h
@@ -10,6 +10,14 @@ inline f32 JMAFastReciprocal(f32 value) {
return __fres(value);
}
+inline f32 JMAFastSqrt(f32 input) {
+ if (input > 0.0f) {
+ f64 tmp = __frsqrte(input);
+ return tmp * input;
+ }
+ return input;
+}
+
namespace JMath {
inline f32 fastReciprocal(f32 value) {