ROUNDEVEN(3G)

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

πŸ’– roundEven β€” find the nearest even integer to the parameter πŸ’–

okay bestie, this is roundEven(3G) β€” the section 3G of the manual, so it's a GLSL shading-language thing, not a command you run in your shell. no cap. πŸŽ€


✨ NAME ✨

roundEven β€” find the nearest even integer to the parameter πŸ‘‘

🌸 DECLARATION 🌸

here's the signature, exactly as written, don't touch a character:

genType roundEven(genType x);

genDType roundEven(genDType x);

πŸ¦‹ PARAMETERS πŸ¦‹

  • x β€” Specify the value to evaluate. that's the whole assignment, girl. hand it a value, it does the thing. πŸ’…

πŸ’œ DESCRIPTION πŸ’œ

so roundEven returns a value equal to the nearest integer to x. but here's the twist that makes it the main character: the fractional part of 0.5 will round toward the nearest even integer. for example, both 3.5 and 4.5 will round to 4.0. yes literally both. that's not a typo, that's the entire point of the function. it's giving banker's rounding energy. ✨

πŸ”₯ VERSION SUPPORT πŸ”₯

the original ships this as a big gorgeous grid of OpenGL Shading Language Versions, so let me unspool it for you cell by cell, no details lost. the versions we're checking are: 1.10, 1.20, 1.30, 1.40, 1.50, 3.30, 4.00, 4.10, 4.20, 4.30, 4.40, 4.50. 🫢

🌈 roundEven (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 β€” βœ”

πŸ’« roundEven (genDType)

  • 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 the genType girlies got in at 1.30, and the genDType girlies had to wait all the way until 4.00. we love a late bloomer. πŸ˜­πŸ’–

πŸ‘‘ SEE ALSO πŸ‘‘

floor(), round() β€” go say hi, they're all in the same friend group. 🧚

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


bestie this page came from [FIXME: source] and it's dated 01/03/2018, manual section 3G, so if you're citing it, that's the tea. πŸ’…βœ¨

okay that's the whole page, ate and left no crumbs, go forth and round to the nearest even integer fr fr πŸŽ€πŸ’–

πŸ“¦ where this page comes from