sdlFloorf function

double sdlFloorf(
  1. double x
)

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 single-precision floating point values, use SDL_floorf for double-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_floor \sa SDL_ceilf \sa SDL_truncf \sa SDL_roundf \sa SDL_lroundf

extern SDL_DECLSPEC float SDLCALL SDL_floorf(float x)

Implementation

double sdlFloorf(double x) {
  final sdlFloorfLookupFunction = libSdl3.lookupFunction<
      Float Function(Float x), double Function(double x)>('SDL_floorf');
  return sdlFloorfLookupFunction(x);
}