Skip to main content

SDL_modf

Function SDL_modf 

Source
pub unsafe extern "C" fn SDL_modf(
    x: c_double,
    y: *mut c_double,
) -> c_double
Expand description

Split x into integer and fractional parts

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

§Parameters

  • x: floating point value.
  • y: output pointer to store the integer part of x.

§Return value

Returns the fractional part of x.

§Thread safety

It is safe to call this function from any thread.

§Availability

This function is available since SDL 3.2.0.

§See also