MODF(3G)

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

πŸ’– MODF(3G) β€” the modf page, bestie edition πŸ’–

okay so this is modf, and it lives in the 3G manual, which is the OpenGL Shading Language corner of the universe ✨ (the header calls the manual [FIXME: manual], iconic placeholder behaviour, we love her πŸŽ€).


🌸 NAME 🌸

modf β€” separate a value into its integer and fractional components πŸ’…


✨ DECLARATION ✨

bestie here is the actual signature, copy it exactly okay, no typos, no vibes-based guessing 🫢

genType modf(genType x, out genType i);

genDType modf(genDType x, out genDType i);

πŸŽ€ PARAMETERS πŸŽ€

  • x β€” this is the value you wanna separate, the poor little thing is getting split in half 😭
  • out i β€” a variable that receives the integer part of the argument. note the out β€” she's an output, she's the one catching the integer half 🫴

πŸ’œ DESCRIPTION πŸ’œ

so modf takes a floating point value x and goes βœ‚οΈ and splits it into its integer part and its fractional part. the fractional part is what gets returned from the function (main character energy, she comes back out front), and the integer part (as a floating point quantity, ok, not an int, don't come for me) gets returned in the output parameter i. two halves, two delivery methods, one very efficient little function, we stan 🌈


πŸ‘‘ VERSION SUPPORT πŸ‘‘

this is the whole vibe check of "which GLSL version will even let you use this", and the answer is: genType has been around longer than genDType. periodt πŸ’…

OpenGL Shading Language Version

modf (genType):

  • 1.10 β€” - (nope, not yet πŸ™ˆ)
  • 1.20 β€” - (still nope)
  • 1.30 β€” βœ” βœ…
  • 1.40 β€” βœ” βœ…
  • 1.50 β€” βœ” βœ…
  • 3.30 β€” βœ” βœ…
  • 4.00 β€” βœ” βœ…
  • 4.10 β€” βœ” βœ…
  • 4.20 β€” βœ” βœ…
  • 4.30 β€” βœ” βœ…
  • 4.40 β€” βœ” βœ…
  • 4.50 β€” βœ” βœ…

modf (genDType):

  • 1.10 β€” - (no ma'am)
  • 1.20 β€” -
  • 1.30 β€” -
  • 1.40 β€” -
  • 1.50 β€” -
  • 3.30 β€” -
  • 4.00 β€” βœ” βœ… (she arrives!! late but stunning πŸ¦‹)
  • 4.10 β€” βœ” βœ…
  • 4.20 β€” βœ” βœ…
  • 4.30 β€” βœ” βœ…
  • 4.40 β€” βœ” βœ…
  • 4.50 β€” βœ” βœ…

πŸ”₯ SEE ALSO πŸ”₯

go say hi to her friends, they're all in the same friend group 🫢

  • fract()
  • floor()

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 page, bestie πŸ’– this one came from [FIXME: source] and it's dated 01/03/2018 β€” shoutout to the source for being a lil mysterious about itself, and to Khronos Group for the copyright, iykyk πŸŒΈβœ¨πŸ’…

πŸ“¦ where this page comes from