Added SDL_isinf(), SDL_isinff(), SDL_isnan(), and SDL_isnanf()

This commit is contained in:
Sam Lantinga committed 2024-06-24 11:49:15 -07:00
1 parent 410bed20ba
commit 89cdadf7c3
25 files changed
+359 -53

No files matched your search

+56
View File
@@ -2066,6 +2066,62 @@ extern SDL_DECLSPEC double SDLCALL SDL_fmod(double x, double y);
*/
extern SDL_DECLSPEC float SDLCALL SDL_fmodf(float x, float y);
/**
* Return whether the value is infinity.
*
* \param x double-precision floating point value.
* \returns non-zero if the value is infinity, 0 otherwise.
*
* \threadsafety It is safe to call this function from any thread.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_isinff
*/
extern SDL_DECLSPEC int SDLCALL SDL_isinf(double x);
/**
* Return whether the value is infinity.
*
* \param x floating point value.
* \returns non-zero if the value is infinity, 0 otherwise.
*
* \threadsafety It is safe to call this function from any thread.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_isinf
*/
extern SDL_DECLSPEC int SDLCALL SDL_isinff(float x);
/**
* Return whether the value is NaN.
*
* \param x double-precision floating point value.
* \returns non-zero if the value is NaN, 0 otherwise.
*
* \threadsafety It is safe to call this function from any thread.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_isnanf
*/
extern SDL_DECLSPEC int SDLCALL SDL_isnan(double x);
/**
* Return whether the value is NaN.
*
* \param x floating point value.
* \returns non-zero if the value is NaN, 0 otherwise.
*
* \threadsafety It is safe to call this function from any thread.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_isnan
*/
extern SDL_DECLSPEC int SDLCALL SDL_isnanf(float x);
/**
* Compute the natural logarithm of `x`.
*
@@ -152,6 +152,10 @@
#cmakedefine HAVE_FLOORF 1
#cmakedefine HAVE_FMOD 1
#cmakedefine HAVE_FMODF 1
#cmakedefine HAVE_ISINF 1
#cmakedefine HAVE_ISINFF 1
#cmakedefine HAVE_ISNAN 1
#cmakedefine HAVE_ISNANF 1
#cmakedefine HAVE_LOG 1
#cmakedefine HAVE_LOGF 1
#cmakedefine HAVE_LOG10 1
@@ -109,6 +109,10 @@
#define HAVE_FLOORF 1
#define HAVE_FMOD 1
#define HAVE_FMODF 1
#define HAVE_ISINF 1
#define HAVE_ISINF_FLOAT_MACRO 1
#define HAVE_ISNAN 1
#define HAVE_ISNAN_FLOAT_MACRO 1
#define HAVE_LOG 1
#define HAVE_LOGF 1
#define HAVE_LOG10 1
@@ -101,6 +101,10 @@
#define HAVE_FLOORF 1
#define HAVE_FMOD 1
#define HAVE_FMODF 1
#define HAVE_ISINF 1
#define HAVE_ISINF_FLOAT_MACRO 1
#define HAVE_ISNAN 1
#define HAVE_ISNAN_FLOAT_MACRO 1
#define HAVE_LOG 1
#define HAVE_LOGF 1
#define HAVE_LOG10 1
@@ -105,6 +105,10 @@
#define HAVE_FLOORF 1
#define HAVE_FMOD 1
#define HAVE_FMODF 1
#define HAVE_ISINF 1
#define HAVE_ISINF_FLOAT_MACRO 1
#define HAVE_ISNAN 1
#define HAVE_ISNAN_FLOAT_MACRO 1
#define HAVE_LOG 1
#define HAVE_LOGF 1
#define HAVE_LOG10 1
@@ -175,6 +175,10 @@ typedef unsigned int uintptr_t;
#define HAVE_FABS 1
#define HAVE_FLOOR 1
#define HAVE_FMOD 1
#define HAVE_ISINF 1
#define HAVE_ISINF_FLOAT_MACRO 1
#define HAVE_ISNAN 1
#define HAVE_ISNAN_FLOAT_MACRO 1
#define HAVE_LOG 1
#define HAVE_LOG10 1
#define HAVE_POW 1
@@ -111,6 +111,10 @@
#define HAVE_FABS 1
#define HAVE_FLOOR 1
#define HAVE_FMOD 1
#define HAVE_ISINF 1
#define HAVE_ISINF_FLOAT_MACRO 1
#define HAVE_ISNAN 1
#define HAVE_ISNAN_FLOAT_MACRO 1
#define HAVE_LOG 1
#define HAVE_LOG10 1
#define HAVE_POW 1
@@ -123,6 +123,10 @@
#define HAVE_FLOORF 1
#define HAVE_FMOD 1
#define HAVE_FMODF 1
#define HAVE_ISINF 1
#define HAVE_ISINF_FLOAT_MACRO 1
#define HAVE_ISNAN 1
#define HAVE_ISNAN_FLOAT_MACRO 1
#define HAVE_LOG 1
#define HAVE_LOGF 1
#define HAVE_LOG10 1
@@ -110,6 +110,10 @@
#define HAVE_FABS 1
#define HAVE_FLOOR 1
#define HAVE_FMOD 1
#define HAVE_ISINF 1
#define HAVE_ISINF_FLOAT_MACRO 1
#define HAVE_ISNAN 1
#define HAVE_ISNAN_FLOAT_MACRO 1
#define HAVE_LOG 1
#define HAVE_LOG10 1
#define HAVE_POW 1