@@ -1725,7 +1725,7 @@ function SDL_cosf(x: cfloat): cfloat; cdecl;
1725
1725
* Compute the exponential of `x`.
1726
1726
*
1727
1727
* The definition of `y = exp(x)` is `y = e^x`, where `e` is the base of the
1728
- * natural logarithm. The inverse is the natural logarithm, SDL_log .
1728
+ * natural logarithm. The inverse is the natural logarithm, SDL_logn .
1729
1729
*
1730
1730
* Domain: `-INF <= x <= INF`
1731
1731
*
@@ -1749,7 +1749,7 @@ function SDL_cosf(x: cfloat): cfloat; cdecl;
1749
1749
* \s ince This function is available since SDL 3.2.0.
1750
1750
*
1751
1751
* \s a SDL_expf
1752
- * \s a SDL_log
1752
+ * \s a SDL_logn
1753
1753
*}
1754
1754
function SDL_exp(x: cdouble): cdouble; cdecl;
1755
1755
external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name ' _SDL_exp' {$ENDIF} {$ENDIF};
@@ -1758,7 +1758,7 @@ function SDL_exp(x: cdouble): cdouble; cdecl;
1758
1758
* Compute the exponential of `x`.
1759
1759
*
1760
1760
* The definition of `y = exp(x)` is `y = e^x`, where `e` is the base of the
1761
- * natural logarithm. The inverse is the natural logarithm, SDL_logf .
1761
+ * natural logarithm. The inverse is the natural logarithm, SDL_lognf .
1762
1762
*
1763
1763
* Domain: `-INF <= x <= INF`
1764
1764
*
@@ -1782,7 +1782,7 @@ function SDL_exp(x: cdouble): cdouble; cdecl;
1782
1782
* \s ince This function is available since SDL 3.2.0.
1783
1783
*
1784
1784
* \s a SDL_exp
1785
- * \s a SDL_logf
1785
+ * \s a SDL_lognf
1786
1786
*}
1787
1787
function SDL_expf(x: cfloat): cfloat; cdecl;
1788
1788
external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name ' _SDL_expf' {$ENDIF} {$ENDIF};
@@ -2071,6 +2071,139 @@ function SDL_isnan(x: cdouble): cint; cdecl;
2071
2071
function SDL_isnanf(x: cfloat): cint; cdecl;
2072
2072
external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name ' _SDL_isnanf' {$ENDIF} {$ENDIF};
2073
2073
2074
+ {*
2075
+ * Compute the natural logarithm of `x`.
2076
+ *
2077
+ * Domain: `0 < x <= INF`
2078
+ *
2079
+ * Range: `-INF <= y <= INF`
2080
+ *
2081
+ * It is an error for `x` to be less than or equal to 0.
2082
+ *
2083
+ * This function operates on double-precision floating point values, use
2084
+ * SDL_lognf for single-precision floats.
2085
+ *
2086
+ * This function may use a different approximation across different versions,
2087
+ * platforms and configurations. i.e, it can return a different value given
2088
+ * the same input on different machines or operating systems, or if SDL is
2089
+ * updated.
2090
+ *
2091
+ * NOTE: In the original SDL3 API, this function is called `SDL_log`.
2092
+ * Because function names are case-insensitive in Pascal, this causes
2093
+ * a duplicate identifier conflict with `SDL_Log`, the logging function.
2094
+ * Hence, this function has been renamed in the Pascal units.
2095
+ *
2096
+ * \p aram x floating point value. Must be greater than 0.
2097
+ * \r eturns the natural logarithm of `x`.
2098
+ *
2099
+ * \t hreadsafety It is safe to call this function from any thread.
2100
+ *
2101
+ * \s ince This function is available since SDL 3.2.0.
2102
+ *
2103
+ * \s a SDL_lognf
2104
+ * \s a SDL_log10
2105
+ * \s a SDL_exp
2106
+ *}
2107
+ function SDL_logn(x: cdouble): cdouble; cdecl;
2108
+ external SDL_LibName
2109
+ name {$IF DEFINED(DELPHI) AND DEFINED(MACOS)} ' _SDL_log' {$ELSE} ' SDL_log' {$ENDIF};
2110
+
2111
+ {*
2112
+ * Compute the natural logarithm of `x`.
2113
+ *
2114
+ * Domain: `0 < x <= INF`
2115
+ *
2116
+ * Range: `-INF <= y <= INF`
2117
+ *
2118
+ * It is an error for `x` to be less than or equal to 0.
2119
+ *
2120
+ * This function operates on single-precision floating point values, use
2121
+ * SDL_logn for double-precision floats.
2122
+ *
2123
+ * This function may use a different approximation across different versions,
2124
+ * platforms and configurations. i.e, it can return a different value given
2125
+ * the same input on different machines or operating systems, or if SDL is
2126
+ * updated.
2127
+ *
2128
+ * NOTE: In the original SDL3 API, this function is called `SDL_logf`.
2129
+ * In the Pascal units, it has been renamed to match `SDL_logn`.
2130
+ *
2131
+ * \p aram x floating point value. Must be greater than 0.
2132
+ * \r eturns the natural logarithm of `x`.
2133
+ *
2134
+ * \t hreadsafety It is safe to call this function from any thread.
2135
+ *
2136
+ * \s ince This function is available since SDL 3.2.0.
2137
+ *
2138
+ * \s a SDL_logn
2139
+ * \s a SDL_expf
2140
+ *}
2141
+ function SDL_lognf(x: cfloat): cfloat; cdecl;
2142
+ external SDL_LibName
2143
+ name {$IF DEFINED(DELPHI) AND DEFINED(MACOS)} ' _SDL_logf' {$ELSE} ' SDL_logf' {$ENDIF};
2144
+
2145
+ {*
2146
+ * Compute the base-10 logarithm of `x`.
2147
+ *
2148
+ * Domain: `0 < x <= INF`
2149
+ *
2150
+ * Range: `-INF <= y <= INF`
2151
+ *
2152
+ * It is an error for `x` to be less than or equal to 0.
2153
+ *
2154
+ * This function operates on double-precision floating point values, use
2155
+ * SDL_log10f for single-precision floats.
2156
+ *
2157
+ * This function may use a different approximation across different versions,
2158
+ * platforms and configurations. i.e, it can return a different value given
2159
+ * the same input on different machines or operating systems, or if SDL is
2160
+ * updated.
2161
+ *
2162
+ * \p aram x floating point value. Must be greater than 0.
2163
+ * \r eturns the logarithm of `x`.
2164
+ *
2165
+ * \t hreadsafety It is safe to call this function from any thread.
2166
+ *
2167
+ * \s ince This function is available since SDL 3.2.0.
2168
+ *
2169
+ * \s a SDL_log10f
2170
+ * \s a SDL_logn
2171
+ * \s a SDL_pow
2172
+ *}
2173
+ function SDL_log10(x: cdouble): cdouble;
2174
+ external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name ' _SDL_log10' {$ENDIF} {$ENDIF};
2175
+
2176
+ {*
2177
+ * Compute the base-10 logarithm of `x`.
2178
+ *
2179
+ * Domain: `0 < x <= INF`
2180
+ *
2181
+ * Range: `-INF <= y <= INF`
2182
+ *
2183
+ * It is an error for `x` to be less than or equal to 0.
2184
+ *
2185
+ * This function operates on single-precision floating point values, use
2186
+ * SDL_log10 for double-precision floats.
2187
+ *
2188
+ * This function may use a different approximation across different versions,
2189
+ * platforms and configurations. i.e, it can return a different value given
2190
+ * the same input on different machines or operating systems, or if SDL is
2191
+ * updated.
2192
+ *
2193
+ * \p aram x floating point value. Must be greater than 0.
2194
+ * \r eturns the logarithm of `x`.
2195
+ *
2196
+ * \t hreadsafety It is safe to call this function from any thread.
2197
+ *
2198
+ * \s ince This function is available since SDL 3.2.0.
2199
+ *
2200
+ * \s a SDL_log10
2201
+ * \s a SDL_lognf
2202
+ * \s a SDL_powf
2203
+ *}
2204
+ function SDL_log10f(x: cfloat): cfloat; cdecl;
2205
+ external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name ' _SDL_log10f' {$ENDIF} {$ENDIF};
2206
+
2074
2207
{*
2075
2208
* Split `x` into integer and fractional parts
2076
2209
*
@@ -2141,7 +2274,7 @@ function SDL_modff(x: cfloat; y: pcfloat): cfloat; cdecl;
2141
2274
*
2142
2275
* \s a SDL_powf
2143
2276
* \s a SDL_exp
2144
- * \s a SDL_log
2277
+ * \s a SDL_logn
2145
2278
*}
2146
2279
function SDL_pow(x, y: cdouble): cdouble; cdecl;
2147
2280
external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name ' _SDL_pow' {$ENDIF} {$ENDIF};
@@ -2174,7 +2307,7 @@ function SDL_pow(x, y: cdouble): cdouble; cdecl;
2174
2307
*
2175
2308
* \s a SDL_pow
2176
2309
* \s a SDL_expf
2177
- * \s a SDL_logf
2310
+ * \s a SDL_lognf
2178
2311
*}
2179
2312
function SDL_powf(x, y: cfloat): cfloat; cdecl;
2180
2313
external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name ' _SDL_powf' {$ENDIF} {$ENDIF};
0 commit comments