sdlAbs function

int sdlAbs(
  1. int x
)

Compute the absolute value of x.

\param x an integer value. \returns the absolute value of x.

\threadsafety It is safe to call this function from any thread.

\since This function is available since SDL 3.1.3.

extern SDL_DECLSPEC int SDLCALL SDL_abs(int x)

Implementation

int sdlAbs(int x) {
  final sdlAbsLookupFunction = libSdl3
      .lookupFunction<Int32 Function(Int32 x), int Function(int x)>('SDL_abs');
  return sdlAbsLookupFunction(x);
}