SDL_log10(3)
π SDL_log10 β it's giving math, bestie π
okay so you found yourself in the SDL3 FUNCTIONS section of the manual, staring at SDL_log10(3), and honestly? slay. let's get into it.
β¨ NAME β¨
SDL_log10 β Compute the base-10 logarithm of x.
like. the log base ten. the one your calculator has a button for. that one. π
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_stdinc.h>
double SDL_log10(double x);
π¦ DESCRIPTION π¦
Domain: 0 < x <= INF
Range: -INF <= y <= INF
bestie. listen. it is an error for x to be less than or equal to 0. not "a little weird", not "eh it'll be fine" β an actual error. do not pass it a zero. do not pass it a negative. i am begging. π
This function operates on double-precision floating point values, so if you're out here working with single-precision floats, use SDL_log10f instead. she's the float version. different girl, same vibe. β¨
Also, real talk: this function may use a different approximation across different versions, platforms and configurations. which means it can literally return a different value given the same input on different machines or operating systems, or if SDL gets updated. so don't go comparing outputs across boxes and having a meltdown. it's not a bug, it's just how she moves. π«Ά
π FUNCTION PARAMETERS π
xβ floating point value. Must be greater than0. that's it. that's the whole requirement. but it IS a requirement. π
β RETURN VALUE β
Returns the logarithm of x. iconic behaviour, no notes. π
π THREAD SAFETY π
It is safe to call this function from any thread. go forth. spawn threads. she can handle it. main character energy fr fr. π
π§ AVAILABILITY π§
This function is available since SDL 3.2.0. so if you're on something older, that's a you problem, bestie. upgrade. π
π₯ SEE ALSO π₯
iykyk. go read those next. β¨
and that's the whole page, no cap. every option, every bound, every vibe β preserved. periodt. π
okay bye ily, this was Simple Directmedia Layer's SDL 3.4.18 release of the page, brought to you by the letter S, the letter D, and the letter L. ππ¦πΈ
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms