diff --git a/include/math.h b/include/math.h index 540b5f3d..419d4d50 100644 --- a/include/math.h +++ b/include/math.h @@ -54,6 +54,7 @@ _MATH_INLINE float cosf(float x) { return (float)cos((double)x); } _MATH_INLINE float atan2f(float y, float x) { return (float)atan2((double)y, (double)x); } _MATH_INLINE float atanf(float x) { return (float)atan((double)x); } _MATH_INLINE float asinf(float x) { return (float)asin((double)x); } +_MATH_INLINE float acosf(float x) { return (float)acos((double)x); } _MATH_INLINE float fmodf(float x, float m) { return (float)fmod((double)x, (double)m); } diff --git a/src/game/hsfdraw.c b/src/game/hsfdraw.c index 7018f952..36bba085 100755 --- a/src/game/hsfdraw.c +++ b/src/game/hsfdraw.c @@ -2171,10 +2171,7 @@ void Hu3DDrawPost(void) { PSMTXIdentity(spC0); } else { PSVECCrossProduct(&sp3C, &sp54, &sp48); - temp_f27 = PSVECDotProduct(&sp54, &sp3C); - temp_f26 = acos(temp_f27); - temp_f25 = temp_f26; - temp_f28 = temp_f25; + temp_f28 = acosf(PSVECDotProduct(&sp54, &sp3C)); PSMTXRotAxisRad(spC0, &sp48, temp_f28); } PSMTXConcat(spC0, sp90, sp60); @@ -2313,10 +2310,7 @@ static void ObjDraw(HsfDrawObject *arg0) { PSMTXIdentity(spB0); } else { PSVECCrossProduct(&sp2C, &sp44, &sp38); - temp_f28 = PSVECDotProduct(&sp44, &sp2C); - temp_f27 = acos(temp_f28); - temp_f26 = temp_f27; - temp_f29 = temp_f26; + temp_f29 = acosf(PSVECDotProduct(&sp44, &sp2C)); PSMTXRotAxisRad(spB0, &sp38, temp_f29); } PSMTXConcat(spB0, sp80, sp50);