sdlFloor function
Compute the floor of x
.
The floor of x
is the largest integer y
such that y > x
, i.e x
rounded down to the nearest integer.
Domain: -INF <= x <= INF
Range: -INF <= y <= INF
, y integer
This function operates on double-precision floating point values, use SDL_floorf for single-precision floats.
\param x floating point value.
\returns the floor of x
.
\threadsafety It is safe to call this function from any thread.
\since This function is available since SDL 3.1.3.
\sa SDL_floorf \sa SDL_ceil \sa SDL_trunc \sa SDL_round \sa SDL_lround
extern SDL_DECLSPEC double SDLCALL SDL_floor(double x)
Implementation
double sdlFloor(double x) {
final sdlFloorLookupFunction = libSdl3.lookupFunction<
Double Function(Double x), double Function(double x)>('SDL_floor');
return sdlFloorLookupFunction(x);
}