sdlModff function

double sdlModff(
  1. double x,
  2. Pointer<Float> y
)

Split x into integer and fractional parts

This function operates on single-precision floating point values, use SDL_modf for double-precision floats.

\param x floating point value. \param y output pointer to store the integer part of x. \returns the fractional part 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_modf \sa SDL_truncf \sa SDL_fmodf

extern SDL_DECLSPEC float SDLCALL SDL_modff(float x, float *y)

Implementation

double sdlModff(double x, Pointer<Float> y) {
  final sdlModffLookupFunction = libSdl3.lookupFunction<
      Float Function(Float x, Pointer<Float> y),
      double Function(double x, Pointer<Float> y)>('SDL_modff');
  return sdlModffLookupFunction(x, y);
}