INVERSESQRT(3G)

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

πŸ’– INVERSESQRT πŸ’–

okay bestie, welcome to INVERSESQRT(3G) β€” yes that's the 3G manual, the OpenGL shading language one, and yes we're gonna have fun with it. πŸŽ€ This page is literally just about one little function that flips your square root upside down and it's lowkey iconic.


🌸 NAME 🌸

inversesqrt β€” return the inverse of the square root of the parameter ✨


πŸ¦‹ DECLARATION πŸ¦‹

here's the tea, the exact signatures, no notes:

genType inversesqrt(genType x);

genDType inversesqrt(genDType x);

πŸ’œ PARAMETERS πŸ’œ

  • x β€” Specify the value of which to take the inverse of the square root.

✨ DESCRIPTION ✨

so inversesqrt returns the inverse of the square root of $x$; i.e. the value $1 \over { \sqrt x }$. it's giving "math but make it reciprocal". 🧚

🚨 ok important: the result is undefined if $x \leq 0$. not "kinda weird", not "a little off" β€” undefined, periodt. don't come crying to me when your zero gives you nonsense. πŸ’€

πŸ‘‘ VERSION SUPPORT πŸ‘‘

the vibe check on which OpenGL Shading Language versions said yes to this function (βœ” = supported, - = not supported):

inversesqrt (genType)

  • OpenGL Shading Language Version 1.10 β€” -
  • OpenGL Shading Language Version 1.20 β€” -
  • OpenGL Shading Language Version 1.30 β€” βœ”
  • OpenGL Shading Language Version 1.40 β€” βœ”
  • OpenGL Shading Language Version 1.50 β€” βœ”
  • OpenGL Shading Language Version 3.30 β€” βœ”
  • OpenGL Shading Language Version 4.00 β€” βœ”
  • OpenGL Shading Language Version 4.10 β€” βœ”
  • OpenGL Shading Language Version 4.20 β€” βœ”
  • OpenGL Shading Language Version 4.30 β€” βœ”
  • OpenGL Shading Language Version 4.40 β€” βœ”
  • OpenGL Shading Language Version 4.50 β€” βœ”

inversesqrt (genDType)

  • OpenGL Shading Language Version 1.10 β€” -
  • OpenGL Shading Language Version 1.20 β€” -
  • OpenGL Shading Language Version 1.30 β€” -
  • OpenGL Shading Language Version 1.40 β€” -
  • OpenGL Shading Language Version 1.50 β€” -
  • OpenGL Shading Language Version 3.30 β€” -
  • OpenGL Shading Language Version 4.00 β€” βœ”
  • OpenGL Shading Language Version 4.10 β€” βœ”
  • OpenGL Shading Language Version 4.20 β€” βœ”
  • OpenGL Shading Language Version 4.30 β€” βœ”
  • OpenGL Shading Language Version 4.40 β€” βœ”
  • OpenGL Shading Language Version 4.50 β€” βœ”

like, the genDType version showed up so late to the party, but it made it. 🫢


🌈 SEE ALSO 🌈

  • pow()
  • sqrt()

go read those too, they're the friend group. iykyk. πŸ’…


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


ok that's the whole page bestie, no cap. this came from [FIXME: source] and it's dated 01/03/2018 β€” big INVERSESQRT(3G) energy from start to finish. mwah. πŸ’–βœ¨πŸŒΈ

πŸ“¦ where this page comes from