NORMALIZE(3G)

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

πŸ’… NORMALIZE (the 3G one, bestie) πŸ’…

okay so welcome to the normalize page of the manual, and honestly? it's giving math baddie. it's a GLSL thing, it lives in section 3G, and it's about to make your vectors behave.


✨ NAME ✨

normalize β€” calculate the normalize product of two vectors

okay wait. i'm just the messenger here, that's literally what it says. yes it says "two vectors" even though there's one parameter. i don't make the rules, i just vibe with them. 🫢

🌸 DECLARATION 🌸

genType normalize(genType v);

genDType normalize(genDType v);

two whole signatures, one for genType and one for genDType. double the slay. πŸ’–


πŸŽ€ PARAMETERS πŸŽ€

  • v β€” this is the vector you wanna normalize. that's it, that's the whole parameter. she's simple, she's iconic.

πŸ¦‹ DESCRIPTION πŸ¦‹

so normalize hands you back a vector that points in the same direction as its parameter, v, but with length 1. same vibe, same direction, just scaled to be exactly one unit long. no cap. ✨


πŸ‘‘ VERSION SUPPORT πŸ‘‘

here's the vibe check on which OpenGL Shading Language versions said yes to this function. the columns are GLSL versions 1.10, 1.20, 1.30, 1.40, 1.50, 3.30, 4.00, 4.10, 4.20, 4.30, 4.40 and 4.50, and the βœ” means supported while the - means not supported.

normalize (genType) β€” supported in every single one, no exceptions:

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

normalize (genDType) β€” she arrived late to the party and the early versions simply weren't ready for her:

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

so like, genType has been that girl since 1.10, and genDType showed up at 4.00 and has been eating ever since. πŸ’…


πŸ”₯ SEE ALSO πŸ”₯

  • length()

(the sibling. the other half. go read her page too, bestie. 🌈)


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


and that's the whole page, bestie!! πŸŽ€ this one came from [FIXME: source] and is dated 01/03/2018, and the manual name we were chilling in this whole time was NORMALIZE(3G). periodt. πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from