FRACT(3G)

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

✨ FRACT(3G) ✨

okay bestie, we're in the 3G manual today and it's giving OpenGL shading language realness πŸ’…


πŸŽ€ NAME πŸŽ€

fract β€” compute the fractional part of the argument


🌸 DECLARATION 🌸

here's the glow-up, exact as it is, no notes:

genType fract(genType x);

genDType fract(genDType x);

πŸ¦‹ PARAMETERS πŸ¦‹

  • x β€” the value you want evaluated. that's it, that's the whole job 🫢

πŸ’– DESCRIPTION πŸ’–

fract hands you back the fractional part of x, calculated like this:

x - floor()(x)

literally just that. the math is mathing 🧚


πŸ‘‘ VERSION SUPPORT πŸ‘‘

so this is where it gets ✨specific✨, bestie. it's all about which OpenGL Shading Language version you're on:

fract (genType) β€” slay in every single one, no cap:

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

fract (genDType) β€” she arrived fashionably late πŸ’€:

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

πŸ”₯ SEE ALSO πŸ”₯

floor(), round()


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!! πŸŽ€ the source is marked <code>[FIXME: source]</code> and she was dated <code>01/03/2018</code>, so shoutout to that era of the internet πŸ’– k bye, go compute some fractional parts, you icon πŸ‘‘

πŸ“¦ where this page comes from