Function SDL_fabs

pub unsafe extern "C" fn SDL_fabs(x: f64) -> f64 
Available on crate feature dep_sdl3 only.
Expand description

Compute the absolute value of x

Domain: -INF <= x <= INF

Range: 0 <= y <= INF

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

§Parameters

  • x: floating point value to use as the magnitude.

§Return value

Returns the absolute value 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