SDL_sin(3)
π SDL_sin(3) π
okay so bestie, you're in the SDL3 FUNCTIONS section of the manual, and today's main character is... sine π¦β¨
β¨ NAME β¨
SDL_sin β compute the sine of x. that's it, that's the whole vibe π
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_stdinc.h>
double SDL_sin(double x);
π DESCRIPTION π
okay so, the domain situation: -INF <= x <= INF β like, anything goes in there, no cap.
and the range: -1 <= y <= 1 β it always comes back with a number between -1 and 1, periodt. π
this one is double-precision floating point, okay? if you want single-precision floats, you want SDL_sinf instead. don't mix them up bestie, i'm serious π«Ά
β οΈ and here's the tea: this function may use a different approximation across different versions, platforms and configurations. i.e, it can return a different value given the same input on different machines or operating systems, or if SDL is updated. so like... don't go around assuming it's bit-identical everywhere, because it is not. π
π§ FUNCTION PARAMETERS π§
xβ floating point value, in radians. yes, radians, not degrees. i know. we've all been there π
β RETURN VALUE β
Returns sine of x. slay. β¨
π THREAD SAFETY π
It is safe to call this function from any thread. no drama, no locks, just vibes. π
π« AVAILABILITY π«
This function is available since SDL 3.2.0. if your SDL is older than that, it's giving... nothing, honestly. π
π SEE ALSO π
and that's the whole page, bestie!! this one came to you from the Simple Directmedia Layer girlies, running SDL 3.4.18 β so go forth, compute your sines, stay in your range, and remember: radians only π β¨ππ¦πΈπ
π¦ 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