sdlScalbn function

double sdlScalbn(
  1. double x,
  2. int n
)

Scale x by an integer power of two.

Multiplies x by the nth power of the floating point radix (always 2).

Domain: -INF <= x <= INF, n integer

Range: -INF <= y <= INF

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

\param x floating point value to be scaled. \param n integer exponent. \returns x * 2^n.

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

\since This function is available since SDL 3.1.3.

\sa SDL_scalbnf \sa SDL_pow

extern SDL_DECLSPEC double SDLCALL SDL_scalbn(double x, int n)

Implementation

double sdlScalbn(double x, int n) {
  final sdlScalbnLookupFunction = libSdl3.lookupFunction<
      Double Function(Double x, Int32 n),
      double Function(double x, int n)>('SDL_scalbn');
  return sdlScalbnLookupFunction(x, n);
}