include: Swap parameter names in atan2 functions
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
diff --git a/include/SDL_stdinc.h b/include/SDL_stdinc.h
index 476e2e3..8a32eb2 100644
--- a/include/SDL_stdinc.h
+++ b/include/SDL_stdinc.h
@@ -601,8 +601,8 @@ extern DECLSPEC double SDLCALL SDL_asin(double x);
extern DECLSPEC float SDLCALL SDL_asinf(float x);
extern DECLSPEC double SDLCALL SDL_atan(double x);
extern DECLSPEC float SDLCALL SDL_atanf(float x);
-extern DECLSPEC double SDLCALL SDL_atan2(double x, double y);
-extern DECLSPEC float SDLCALL SDL_atan2f(float x, float y);
+extern DECLSPEC double SDLCALL SDL_atan2(double y, double x);
+extern DECLSPEC float SDLCALL SDL_atan2f(float y, float x);
extern DECLSPEC double SDLCALL SDL_ceil(double x);
extern DECLSPEC float SDLCALL SDL_ceilf(float x);
extern DECLSPEC double SDLCALL SDL_copysign(double x, double y);
diff --git a/src/stdlib/SDL_stdlib.c b/src/stdlib/SDL_stdlib.c
index b6dc32a..789a530 100644
--- a/src/stdlib/SDL_stdlib.c
+++ b/src/stdlib/SDL_stdlib.c
@@ -52,22 +52,22 @@ SDL_atanf(float x)
}
double
-SDL_atan2(double x, double y)
+SDL_atan2(double y, double x)
{
#if defined(HAVE_ATAN2)
- return atan2(x, y);
+ return atan2(y, x);
#else
- return SDL_uclibc_atan2(x, y);
+ return SDL_uclibc_atan2(y, x);
#endif
}
float
-SDL_atan2f(float x, float y)
+SDL_atan2f(float y, float x)
{
#if defined(HAVE_ATAN2F)
- return atan2f(x, y);
+ return atan2f(y, x);
#else
- return (float)SDL_atan2((double)x, (double)y);
+ return (float)SDL_atan2((double)y, (double)x);
#endif
}
@@ -444,7 +444,7 @@ SDL_sin(double x)
#endif
}
-float
+float
SDL_sinf(float x)
{
#if defined(HAVE_SINF)