mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-06-01 01:17:40 +00:00
Removed SDL_stdinc.h dependency on HAVE_M_PI, added SDL_M_PIl (double) and SDL_M_PIf (float) instead
This commit is contained in:
parent
8733927e35
commit
670f1df469
16 changed files with 38 additions and 44 deletions
|
@ -80,13 +80,6 @@
|
|||
# include <ctype.h>
|
||||
#endif
|
||||
#ifdef HAVE_MATH_H
|
||||
# if defined(_MSC_VER) && !defined(_USE_MATH_DEFINES)
|
||||
/* Defining _USE_MATH_DEFINES is required to get M_PI to be defined on
|
||||
Visual Studio. See http://msdn.microsoft.com/en-us/library/4hwaceh6.aspx
|
||||
for more information.
|
||||
*/
|
||||
# define _USE_MATH_DEFINES
|
||||
# endif
|
||||
# include <math.h>
|
||||
#endif
|
||||
#ifdef HAVE_FLOAT_H
|
||||
|
@ -615,10 +608,11 @@ extern DECLSPEC int SDLCALL SDL_vsnprintf(SDL_OUT_Z_CAP(maxlen) char *text, size
|
|||
extern DECLSPEC int SDLCALL SDL_asprintf(char **strp, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
|
||||
extern DECLSPEC int SDLCALL SDL_vasprintf(char **strp, const char *fmt, va_list ap);
|
||||
|
||||
#ifndef HAVE_M_PI
|
||||
#ifndef M_PI
|
||||
#define M_PI 3.14159265358979323846264338327950288 /**< pi */
|
||||
#ifndef SDL_M_PIl
|
||||
#define SDL_M_PIl 3.141592653589793238462643383279502884L /**< pi (double) */
|
||||
#endif
|
||||
#ifndef SDL_M_PIf
|
||||
#define SDL_M_PIf ((float)3.141592653589793238462643383279502884) /**< pi (float) */
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue