From 630afc411bcac925f8e52ef4c1bcd7bd06f73961 Mon Sep 17 00:00:00 2001 From: jacob Date: Mon, 5 Aug 2024 00:24:00 -0500 Subject: [PATCH] fix asin & acos swapped --- src/math.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/math.h b/src/math.h index 77d3b1b3..c1e0cfc2 100644 --- a/src/math.h +++ b/src/math.h @@ -463,13 +463,13 @@ INLINE f32 math_atan2(f32 y, f32 x) { INLINE f32 math_asin(f32 x) { /* TODO: Dedicated arcsin approximation */ - return (PI / 2.0f) - math_atan2(x, math_sqrt(1.0f - (x*x))); + return math_atan2(x, math_sqrt(1.0f - (x * x))); } INLINE f32 math_acos(f32 x) { /* TODO: Dedicated arccos approximation */ - return math_atan2(x, math_sqrt(1.0f - (x*x))); + return (PI / 2.0f) - math_atan2(x, math_sqrt(1.0f - (x * x))); } /* ========================== *