libsdl-org / sdlwiki

This is the raw contents of SDL's wiki. You can edit this through GitHub or at https://wiki.libsdl.org/ now!
https://wiki.libsdl.org/
79 stars 32 forks source link

SDL3/SDL_FLT_EPSILON: Create simple stub for SDL FLT EPSILON constant so no deadlinks are present #549

Closed SDLWikiBot closed 2 months ago

SDLWikiBot commented 3 months ago

This edit was made by @MrOnlineCoder.

Live page is here: https://wiki.libsdl.org/SDL3/SDL_FLT_EPSILON

If this user should be blocked from further edits, an admin should go to https://wiki.libsdl.org/MrOnlineCoder/block If this user should be trusted to make direct pushes to main, without a pull request, an admin should go to https://wiki.libsdl.org/MrOnlineCoder/trust

MrOnlineCoder commented 3 months ago

Cannot unfortunately find a way to provide edits to the PR, so leaving updated file there:

###### (This is the documentation for SDL3, which is under heavy development and the API is changing! [SDL2](https://wiki.libsdl.org/SDL2/) is the current stable version!)
# SDL_FLT_EPSILON

Internal SDL epsilon constant, used for comparing floating-point numbers. Equals by default to platform-defined [FLT_EPSILON](https://en.cppreference.com/w/cpp/header/cfloat). Otherwise, uses a constant of ` 1.1920928955078125e-07F` or `0x0.000002p0`

## Header File

Defined in [<SDL3/SDL_stdinc.h>](https://github.com/libsdl-org/SDL/blob/main/include/SDL3/SDL_stdinc.h)

## Syntax

```c
#ifdef FLT_EPSILON
#define SDL_FLT_EPSILON FLT_EPSILON
#else
#define SDL_FLT_EPSILON 1.1920928955078125e-07F /* 0x0.000002p0 */
#endif

Version

This macro is available since SDL 3.0.0.

See Also


CategoryAPI, CategoryAPIMacro, CategoryStdinc