mirror of
https://github.com/ptitSeb/Serious-Engine
synced 2024-11-22 02:20:25 +01:00
Use standard Sin/Cos version (fixing "The Pit" tilting floor issue, and maybe other similar issues too)
This commit is contained in:
parent
a41642340c
commit
dce391583c
|
@ -69,7 +69,7 @@ double adCosQuadrants[4][2] =
|
|||
{1.0, -90.0},
|
||||
{1.0, 0.0},
|
||||
};
|
||||
|
||||
/*
|
||||
FLOAT Sin(ANGLE a)
|
||||
{
|
||||
double aWrapped = WrapAngle(a);
|
||||
|
@ -92,3 +92,4 @@ FLOAT Tan(ANGLE a)
|
|||
{
|
||||
return Sin(a)/Cos(a);
|
||||
}
|
||||
*/
|
||||
|
|
|
@ -495,9 +495,15 @@ inline FLOAT RadAngle(ANGLE aAngle) {
|
|||
return FLOAT (WrapAngle(aAngle)*PI/ANGLE_180);
|
||||
}
|
||||
|
||||
ENGINE_API FLOAT Sin(ANGLE a);
|
||||
ENGINE_API FLOAT Cos(ANGLE a);
|
||||
ENGINE_API FLOAT Tan(ANGLE a);
|
||||
#ifdef __arm__
|
||||
inline ENGINE_API FLOAT Sin(ANGLE a) { return sinf(a*(PI/ANGLE_180)); };
|
||||
inline ENGINE_API FLOAT Cos(ANGLE a) { return cosf(a*(PI/ANGLE_180)); };
|
||||
inline ENGINE_API FLOAT Tan(ANGLE a) { return tanf(a*(PI/ANGLE_180)); };
|
||||
#else
|
||||
inline ENGINE_API FLOAT Sin(ANGLE a) { return sin(a*(PI/ANGLE_180)); };
|
||||
inline ENGINE_API FLOAT Cos(ANGLE a) { return cos(a*(PI/ANGLE_180)); };
|
||||
inline ENGINE_API FLOAT Tan(ANGLE a) { return tan(a*(PI/ANGLE_180)); };
|
||||
#endif
|
||||
|
||||
#ifdef __arm__
|
||||
inline ENGINE_API FLOAT SinFast(ANGLE a) { return sinf(a*(PI/ANGLE_180)); };
|
||||
|
|
Loading…
Reference in New Issue
Block a user