POW(3G)

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

πŸ’– POW(3G) πŸ’–

okay bestie, welcome to the GLSL power-up page ✨ this one lives in section 3G of the manual (yes, the OpenGL shading one, iykyk) and it's literally just one function. one. and it ate. 🫢


✨ NAME ✨

pow β€” returns the value of the first parameter raised to the power of the second 🌸


πŸŽ€ DECLARATION πŸŽ€

genType pow(genType x, genType y);

πŸ¦‹ PARAMETERS πŸ¦‹

  • x β€” bestie, this is the value you're raising to the power y πŸ’…
  • y β€” and this is the power you're raising x to πŸ‘‘

🌈 DESCRIPTION 🌈

pow hands you back the value of $x$ raised to the $y$ power, aka $x^y$. slay. ✨

πŸ’€ okay but real talk though: the result is undefined if $x < 0$, or if $x = 0$ and $y \leq 0$. like. undefined undefined. not "we'll figure it out", not "probably fine". undefined. protect your shaders, bestie. 😭

πŸ‘‘ VERSION SUPPORT πŸ‘‘

so the whole vibe check here is: does pow show up in your GLSL version? and the answer is yes across the entire board. every single one. periodt. πŸ’–

OpenGL Shading Language Version β€” pow is supported in all of these:

  1. 1.10 β€” βœ” yes
  2. 1.20 β€” βœ” yes
  3. 1.30 β€” βœ” yes
  4. 1.40 β€” βœ” yes
  5. 1.50 β€” βœ” yes
  6. 3.30 β€” βœ” yes
  7. 4.00 β€” βœ” yes
  8. 4.10 β€” βœ” yes
  9. 4.20 β€” βœ” yes
  10. 4.30 β€” βœ” yes
  11. 4.40 β€” βœ” yes
  12. 4.50 β€” βœ” yes

not a single ❌ in sight. iconic behaviour, honestly. πŸ”₯


🌸 SEE ALSO 🌸

go give these siblings some love too, they're all in the same math-girlie family:

  • sin()
  • cos()
  • sinh()
  • cosh()

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!! πŸŽ€ mwah πŸ’… this came to you from [FIXME: source], dated 01/03/2018, and it's still out here being POW(3G) at the bottom like the main character it is. go forth and exponentiate responsibly. πŸ¦‹βœ¨

πŸ“¦ where this page comes from