Skip to content

Commit 00e7f77

Browse files
committed
Add SDL_pow and SDL_sqrt
1 parent 61eba7d commit 00e7f77

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

units/sdlstdinc.inc

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,22 @@ function SDL_lround(x: cdouble): clong; cdecl;
312312
function SDL_lroundf(x: cfloat): clong; cdecl;
313313
external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_lroundf' {$ENDIF} {$ENDIF};
314314

315+
(**
316+
* Calculate the value of x raised to the power of y.
317+
*
318+
* \since This function is available since SDL 2.0.4.
319+
*)
320+
function SDL_pow(x, y: cdouble): cdouble; cdecl;
321+
external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_pow' {$ENDIF} {$ENDIF};
322+
323+
(**
324+
* Calculate the value of x raised to the power of y.
325+
*
326+
* \since This function is available since SDL 2.0.8.
327+
*)
328+
function SDL_powf(x, y: cfloat): cfloat; cdecl;
329+
external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_powf' {$ENDIF} {$ENDIF};
330+
315331
(**
316332
* Round to nearest integral value, away from zero.
317333
*
@@ -344,6 +360,22 @@ function SDL_sin(x: cdouble): cdouble; cdecl;
344360
function SDL_sinf(x: cfloat): cfloat; cdecl;
345361
external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_sinf' {$ENDIF} {$ENDIF};
346362

363+
(**
364+
* Calculate the non-negative square root of x.
365+
*
366+
* \since This function is available since SDL 2.0.4.
367+
*)
368+
function SDL_sqrt(x: cdouble): cdouble; cdecl;
369+
external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_sqrt' {$ENDIF} {$ENDIF};
370+
371+
(**
372+
* Calculate the non-negative square root of x.
373+
*
374+
* \since This function is available since SDL 2.0.4.
375+
*)
376+
function SDL_sqrtf(x: cfloat): cfloat; cdecl;
377+
external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_sqrtf' {$ENDIF} {$ENDIF};
378+
347379
(**
348380
* Calculate the tangent of x, where x is given in radians.
349381
*

0 commit comments

Comments
 (0)