libraries: libc: fix for `FSin` implementation
This commit is contained in:
parent
efeb78f59c
commit
fb237bddad
|
@ -2,6 +2,7 @@
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
#include "common/assert.h"
|
||||||
#include "core/libraries/libc/libc_math.h"
|
#include "core/libraries/libc/libc_math.h"
|
||||||
|
|
||||||
namespace Libraries::LibC {
|
namespace Libraries::LibC {
|
||||||
|
@ -38,8 +39,13 @@ double PS4_SYSV_ABI ps4__Sin(double x) {
|
||||||
return sin(x);
|
return sin(x);
|
||||||
}
|
}
|
||||||
|
|
||||||
float PS4_SYSV_ABI ps4__Fsin(float arg) {
|
float PS4_SYSV_ABI ps4__Fsin(float arg, unsigned int m, int n) {
|
||||||
return sinf(arg);
|
ASSERT(n == 0);
|
||||||
|
if (m != 0) {
|
||||||
|
return cosf(arg);
|
||||||
|
} else {
|
||||||
|
return sinf(arg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
double PS4_SYSV_ABI ps4_exp2(double arg) {
|
double PS4_SYSV_ABI ps4_exp2(double arg) {
|
||||||
|
|
|
@ -13,7 +13,7 @@ float PS4_SYSV_ABI ps4_tanf(float num);
|
||||||
float PS4_SYSV_ABI ps4_asinf(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_pow(double base, double exponent);
|
||||||
double PS4_SYSV_ABI ps4__Sin(double x);
|
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);
|
double PS4_SYSV_ABI ps4_exp2(double arg);
|
||||||
float PS4_SYSV_ABI ps4_powf(float x, float y);
|
float PS4_SYSV_ABI ps4_powf(float x, float y);
|
||||||
float PS4_SYSV_ABI ps4_roundf(float arg);
|
float PS4_SYSV_ABI ps4_roundf(float arg);
|
||||||
|
|
Loading…
Reference in New Issue