summaryrefslogtreecommitdiff
path: root/src/libc_math64.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libc_math64.c')
-rw-r--r--src/libc_math64.c96
1 files changed, 48 insertions, 48 deletions
diff --git a/src/libc_math64.c b/src/libc_math64.c
index 3f2fd61b..8ed1f6e7 100644
--- a/src/libc_math64.c
+++ b/src/libc_math64.c
@@ -34,60 +34,60 @@ f32 Math_RoundF(f32 x) {
f32 Math_FAtanF(f32 x) {
return atanf(x);
-/*
- s32 sector;
- s32 i;
- f32 sq;
- f32 conv = 0.0f;
- f32 z;
-
- if (x > 1.0f) {
- sector = 1;
- x = 1.0f / x;
- } else if (x < -1.0f) {
- sector = -1;
- x = 1.0f / x;
- } else {
- sector = 0;
- }
-
- sq = SQ(x);
-
- for (z = i = 24; i != 0; i--) {
- conv = SQ(z) * sq / (2.0f * z + 1.0f + conv);
- z -= 1.0f;
- }
-
- if (sector > 0) {
- return M_PI / 2.0f - (x / (1.0f + conv));
- } else if (sector < 0) {
- return -M_PI / 2.0f - (x / (1.0f + conv));
- } else {
- return x / (1.0f + conv);
- }
-*/
+ /*
+ s32 sector;
+ s32 i;
+ f32 sq;
+ f32 conv = 0.0f;
+ f32 z;
+
+ if (x > 1.0f) {
+ sector = 1;
+ x = 1.0f / x;
+ } else if (x < -1.0f) {
+ sector = -1;
+ x = 1.0f / x;
+ } else {
+ sector = 0;
+ }
+
+ sq = SQ(x);
+
+ for (z = i = 24; i != 0; i--) {
+ conv = SQ(z) * sq / (2.0f * z + 1.0f + conv);
+ z -= 1.0f;
+ }
+
+ if (sector > 0) {
+ return M_PI / 2.0f - (x / (1.0f + conv));
+ } else if (sector < 0) {
+ return -M_PI / 2.0f - (x / (1.0f + conv));
+ } else {
+ return x / (1.0f + conv);
+ }
+ */
}
f32 Math_FAtan2F(f32 y, f32 x) {
return atan2f(y, x);
-/*
- if ((y == 0.0f) && (x == 0.0f)) {
- return 0.0f;
- }
- if (x == 0.0f) {
- if (y < 0.0f) {
- return -M_PI / 2.0f;
+ /*
+ if ((y == 0.0f) && (x == 0.0f)) {
+ return 0.0f;
+ }
+ if (x == 0.0f) {
+ if (y < 0.0f) {
+ return -M_PI / 2.0f;
+ }
+ return M_PI / 2.0f;
}
- return M_PI / 2.0f;
- }
- if (x < 0.0f) {
- if (y < 0.0f) {
- return -(M_PI - Math_FAtanF(fabs(y / x)));
+ if (x < 0.0f) {
+ if (y < 0.0f) {
+ return -(M_PI - Math_FAtanF(fabs(y / x)));
+ }
+ return M_PI - Math_FAtanF(fabs(y / x));
}
- return M_PI - Math_FAtanF(fabs(y / x));
- }
- return Math_FAtanF(y / x);
-*/
+ return Math_FAtanF(y / x);
+ */
}
f32 Math_FAsinF(f32 x) {