SDL_tan(3)

✨ SDL_tan ✨

okay bestie, welcome to the SDL_tan(3) page from the SDL3 FUNCTIONS crew πŸ’– we're doing trigonometry today and honestly? it's giving math class but make it cute πŸŽ€


🌸 NAME 🌸

SDL_tan β€” compute the tangent of x πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <SDL3/SDL_stdinc.h>

double SDL_tan(double x);

like, that's the whole thing. one include, one function, one double going in and one double coming out 🌈


πŸ’œ DESCRIPTION πŸ’œ

okay so here's the vibe check on your domains and ranges, no cap:

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

this function operates on double-precision floating point values. so if you're out here with single-precision floats, use SDL_tanf instead, iykyk πŸ‘‘

and like, important lore alert 🚨: 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 basically don't be out here expecting bit-for-bit identical results across the whole multiverse, bestie 😭 it's not that kind of function.


πŸŽ€ FUNCTION PARAMETERS πŸŽ€

  • x β€” floating point value, in radians. yes radians, not degrees, don't embarrass us πŸ™ˆ

⭐ RETURN VALUE ⭐

returns the tangent of x. that's it, that's the tea πŸ“


πŸ”₯ THREAD SAFETY πŸ”₯

it is safe to call this function from any thread. multitasking queen behavior, we love to see it πŸ‘‘


🌈 AVAILABILITY 🌈

this function is available since SDL 3.2.0. so if you're on something older… not me, not the vibe πŸ’€


🫢 SEE ALSO 🫢

go read those too, they're all part of the trig bestie squad 🌸


and that's a wrap on SDL_tan(3) from Simple Directmedia Layer, rocking SDL 3.4.18 πŸ’– stay radiant, stay in radians, and slay ✨🧚

πŸ“¦ where this page comes from