diff --git a/src/core/libraries/libc/libc_math.cpp b/src/core/libraries/libc/libc_math.cpp index 281585c6..3b51c80e 100644 --- a/src/core/libraries/libc/libc_math.cpp +++ b/src/core/libraries/libc/libc_math.cpp @@ -2,6 +2,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later #include +#include "common/assert.h" #include "core/libraries/libc/libc_math.h" namespace Libraries::LibC { @@ -38,8 +39,13 @@ double PS4_SYSV_ABI ps4__Sin(double x) { return sin(x); } -float PS4_SYSV_ABI ps4__Fsin(float arg) { - return sinf(arg); +float PS4_SYSV_ABI ps4__Fsin(float arg, unsigned int m, int n) { + ASSERT(n == 0); + if (m != 0) { + return cosf(arg); + } else { + return sinf(arg); + } } double PS4_SYSV_ABI ps4_exp2(double arg) { diff --git a/src/core/libraries/libc/libc_math.h b/src/core/libraries/libc/libc_math.h index 83af029e..70e2f99b 100644 --- a/src/core/libraries/libc/libc_math.h +++ b/src/core/libraries/libc/libc_math.h @@ -13,7 +13,7 @@ float PS4_SYSV_ABI ps4_tanf(float num); float PS4_SYSV_ABI ps4_asinf(float num); double PS4_SYSV_ABI ps4_pow(double base, double exponent); double PS4_SYSV_ABI ps4__Sin(double x); -float PS4_SYSV_ABI ps4__Fsin(float arg); +float PS4_SYSV_ABI ps4__Fsin(float arg, unsigned int,int); double PS4_SYSV_ABI ps4_exp2(double arg); float PS4_SYSV_ABI ps4_powf(float x, float y); float PS4_SYSV_ABI ps4_roundf(float arg);