sdlCeil function stdinc

double sdlCeil(
  1. double x
)

Compute the ceiling of x.

The ceiling of x is the smallest integer y such that y >= x, i.e x rounded up 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_ceilf for single-precision floats.

\param x floating point value. \returns the ceiling 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_ceilf \sa SDL_floor \sa SDL_trunc \sa SDL_round \sa SDL_lround

extern SDL_DECLSPEC double SDLCALL SDL_ceil(double x)

Implementation

double sdlCeil(double x) {
  final sdlCeilLookupFunction = _libSdl
      .lookupFunction<Double Function(Double x), double Function(double x)>(
        'SDL_ceil',
      );
  return sdlCeilLookupFunction(x);
}