SDL_tanf(3)

✨ SDL_tanf ✨

okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, page SDL_tanf(3), where we do trigonometry and we do it cutely. πŸ’–


🌸 NAME 🌸

SDL_tanf β€” compute the tangent of x. that's it, that's the whole job. πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <SDL3/SDL_stdinc.h>

float SDL_tanf(float x);

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the vibe check on this function:

  • Domain: -INF <= x <= INF
  • Range: -INF <= y <= INF

it's giving single-precision floating point, bestie. if you need the double-precision version, that's SDL_tan, not this one. know the difference, it's literally important. 🫢

⚠️ real talk: 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 comparing outputs across machines and being shocked, okay? it's not a bug, it's just how it is. πŸ™ˆ

πŸ“ FUNCTION PARAMETERS πŸ“

  • x β€” floating point value, in radians. radians, bestie, not degrees. don't do that to yourself. 😭

🌈 RETURN VALUE 🌈

returns the tangent of x. that's the whole thing. no error code, no drama, just tangent. ✨


πŸ‘‘ THREAD SAFETY πŸ‘‘

it is safe to call this function from any thread. so go off, queen β€” multi-thread away. πŸ”₯


⭐ AVAILABILITY ⭐

this function is available since SDL 3.2.0. if you're on anything older, no tangent for you, sorry bestie. πŸ’œ


πŸ’« SEE ALSO πŸ’«


Simple Directmedia Layer made this, and this page is from SDL 3.4.18. mwah, go compute some tangents, ily, bye! πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from