sdlFabs function stdinc
Compute the absolute value of x
Domain: -INF <= x <= INF
Range: 0 <= y <= INF
This function operates on double-precision floating point values, use SDL_fabsf for single-precision floats.
\param x floating point value to use as the magnitude.
\returns the absolute value of x.
\threadsafety It is safe to call this function from any thread.
\since This function is available since SDL 3.2.0.
\sa SDL_fabsf
extern SDL_DECLSPEC double SDLCALL SDL_fabs(double x)
Implementation
double sdlFabs(double x) {
final sdlFabsLookupFunction = _libSdl
.lookupFunction<Double Function(Double x), double Function(double x)>(
'SDL_fabs',
);
return sdlFabsLookupFunction(x);
}