ATAN(3G)

πŸ“¦
version 1.0~svn33624 Β· 4 versions
, in ubuntu jammy, ubuntu noble

πŸ¦‹ ATAN β€” bestie, it's giving arc-tangent πŸ¦‹

okay so this is atan, and it lives in section 3G of the manual (yes, 3G, that's the manual name, we're not making it up πŸ’…). This whole page is literally the GLSL atan builtin and it comes in two overloads because of course it does, main character energy fr fr.


πŸ“œ NAME πŸ“œ

atan β€” return the arc-tangent of the parameters. That's it, that's the job. ✨


🌸 DECLARATION 🌸

genType atan(genType y, genType x);

genType atan(genType y_over_x);

two of them!! one takes a whole fraction, one just takes the fraction's vibe already simplified 🫢


πŸŽ€ PARAMETERS πŸŽ€

  • y β€” the numerator of the fraction whose arctangent you want back. the top bit of the fraction, the one on top, iconic. πŸ‘‘
  • x β€” the denominator of that same fraction. the bottom bit. the one holding it down. πŸ’œ
  • y_over_x β€” the fraction itself, already divided, whose arctangent you want. no numerator/denominator split here, just the finished product bestie 🌸

πŸ’« DESCRIPTION πŸ’«

okay so atan returns either the angle whose trigonometric arctangent is $y \over x$, or the angle whose arctangent is y_over_x β€” it literally depends on which overload you invoke. pick your fighter. 😌

Overload number one (atan(y, x)): the signs of $y$ and $x$ are used to determine the quadrant the angle lies in. not just "which angle" β€” which quadrant, she's doing full geometry. the value returned by atan in this case is in the range [-\pi,\pi].

🚨 the result is undefined if x = 0. not "kinda weird", not "a little off" β€” undefined. do not do this. no cap. πŸ’€

Overload number two (atan(y_over_x)): atan returns the angle whose tangent is y_over_x. the value returned in this case is in the range [-{\pi \over 2 },{\pi \over 2}]. no quadrant detective work, she just hands you the angle. 🧚


✨ VERSION SUPPORT ✨

so the original had a whole grid β€” columns were the OpenGL Shading Language Version, the function name row said atan, and every single cell was a βœ”. every one. all twelve. she ate and left no crumbs. πŸ“

  • 1.10 β€” βœ”
  • 1.20 β€” βœ”
  • 1.30 β€” βœ”
  • 1.40 β€” βœ”
  • 1.50 β€” βœ”
  • 3.30 β€” βœ”
  • 4.00 β€” βœ”
  • 4.10 β€” βœ”
  • 4.20 β€” βœ”
  • 4.30 β€” βœ”
  • 4.40 β€” βœ”
  • 4.50 β€” βœ”

twelve for twelve, obsessed, no notes πŸ”₯


πŸ‘€ SEE ALSO πŸ‘€

  • sin()
  • cos()
  • tan()

the whole trig friend group, go say hi 🫢


Copyright Β© 2011-2014 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.


Copyright Β© 2011-2014 Khronos Group


okay that's the whole page bestie, and for the cute sign-off: this came from source [FIXME: source], dated 01/03/2018, and the title it goes by is ATAN(3G). bye ily, go compute some angles responsibly πŸ’–πŸŒˆβ­

πŸ“¦ where this page comes from