From a01d65b0b99400f62d93eee28475872b641cfd50 Mon Sep 17 00:00:00 2001 From: TakaRikka <38417346+TakaRikka@users.noreply.github.com> Date: Tue, 14 Mar 2023 15:27:46 -0700 Subject: d_ky_thunder done / d_scope wip / m_Do_graphic wip (#308) * d_ky_thunder OK + misc build fixes * d_scope mostly done * some m_Do_graphic wip * remove asm --- include/JSystem/JMath/JMath.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'include/JSystem/JMath') diff --git a/include/JSystem/JMath/JMath.h b/include/JSystem/JMath/JMath.h index 5b6b2c5978..d9fb055f24 100644 --- a/include/JSystem/JMath/JMath.h +++ b/include/JSystem/JMath/JMath.h @@ -21,12 +21,16 @@ inline float __frsqrtes(register double f) { return out; } -inline f32 JMAFastSqrt(f32 input) { +inline f32 JMAFastSqrt(register f32 input) { if (input > 0.0f) { - f32 tmp = __frsqrtes(input); - return tmp * input; + register f32 out; + asm { + frsqrte out, input + } + return out * input; + } else { + return input; } - return input; } namespace JMath { -- cgit v1.2.3