Skip to content

Commit 724704c

Browse files
committed
Add SDL_exp, SDL_nlog and SDL_log10
1 parent 00e7f77 commit 724704c

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

units/sdlstdinc.inc

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,24 @@ function SDL_cos(x: cdouble): cdouble; cdecl;
264264
function SDL_cosf(x: cfloat): cfloat; cdecl;
265265
external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_cosf' {$ENDIF} {$ENDIF};
266266

267+
(**
268+
* Calculate the value of e (the base of natural logarithms)
269+
* raised to the power of x.
270+
*
271+
* \since This function is available since SDL 2.0.9.
272+
*)
273+
function SDL_exp(x: cdouble): cdouble; cdecl;
274+
external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_exp' {$ENDIF} {$ENDIF};
275+
276+
(**
277+
* Calculate the value of e (the base of natural logarithms)
278+
* raised to the power of x.
279+
*
280+
* \since This function is available since SDL 2.0.9.
281+
*)
282+
function SDL_expf(x: cfloat): cfloat; cdecl;
283+
external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_expf' {$ENDIF} {$ENDIF};
284+
267285
(**
268286
* Calculate the absolute value of x.
269287
*
@@ -296,6 +314,40 @@ function SDL_floor(x: cdouble): cdouble; cdecl;
296314
function SDL_floorf(x: cfloat): cfloat; cdecl;
297315
external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_floorf' {$ENDIF} {$ENDIF};
298316

317+
(**
318+
* Calculate the natural logarithm of x.
319+
*
320+
* \since This function is available since SDL 2.0.4.
321+
*)
322+
function SDL_nlog(x: cdouble): cdouble; cdecl;
323+
external SDL_LibName
324+
name {$IF DEFINED(DELPHI) AND DEFINED(MACOS)} '_SDL_log' {$ELSE} 'SDL_log' {$ENDIF};
325+
326+
(**
327+
* Calculate the natural logarithm of x.
328+
*
329+
* \since This function is available since SDL 2.0.8.
330+
*)
331+
function SDL_nlogf(x: cfloat): cfloat; cdecl;
332+
external SDL_LibName
333+
name {$IF DEFINED(DELPHI) AND DEFINED(MACOS)} '_SDL_logf' {$ELSE} 'SDL_logf' {$ENDIF};
334+
335+
(**
336+
* Calculate the base 10 logarithm of x.
337+
*
338+
* \since This function is available since SDL 2.0.8.
339+
*)
340+
function SDL_log10(x: cdouble): cdouble; cdecl;
341+
external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_log10' {$ENDIF} {$ENDIF};
342+
343+
(**
344+
* Calculate the base 10 logarithm of x.
345+
*
346+
* \since This function is available since SDL 2.0.8.
347+
*)
348+
function SDL_log10f(x: cfloat): cfloat; cdecl;
349+
external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_log10f' {$ENDIF} {$ENDIF};
350+
299351
(**
300352
* Round to nearest integer, away from zero.
301353
*

0 commit comments

Comments
 (0)