TRUNC(3G)

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

πŸ‘‘ TRUNC(3G) πŸ‘‘

okay bestie, welcome to the TRUNC(3G) page β€” yes it's literally just about rounding down-ish, but she's an icon and we're gonna treat her with respect πŸ’…


πŸ’– NAME πŸ’–

trunc β€” find the nearest integer less than or equal to the parameter

✨ DECLARATION ✨

genType trunc(genType x);

genDType trunc(genDType x);

πŸŽ€ PARAMETERS πŸŽ€

  • x β€” specify the value to evaluate. that's it, that's the whole input, hand her a number and she'll do her thing 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

trunc returns a value equal to the nearest integer to x whose absolute value is not larger than the absolute value of x. no cap, that's the entire job description β€” she's chopping toward zero and she is not sorry about it 🌸

πŸ‘‘ VERSION SUPPORT πŸ‘‘

so here's the vibe check on which OpenGL Shading Language Versions actually support her. the columns 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 β€” a - means nope, a βœ” means slay πŸ”₯

  • trunc (genType) β€” 1.10: -, 1.20: -, 1.30: βœ”, 1.40: βœ”, 1.50: βœ”, 3.30: βœ”, 4.00: βœ”, 4.10: βœ”, 4.20: βœ”, 4.30: βœ”, 4.40: βœ”, 4.50: βœ”
  • trunc (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 genType showed up in 1.30 and never left, but genDType was a whole late bloomer β€” she didn't arrive until 4.00. we love a delayed glow-up 😭

πŸ’œ 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/.

(yeah bestie, it's listed twice, I don't make the rules πŸ™ˆ)

Copyright Β© 2011-2014 Khronos Group


okay that's the whole page, mwah 🧚 this one came from [FIXME: source], dated 01/03/2018, and it's all TRUNC(3G) energy, periodt πŸ’–βœ¨

πŸ“¦ where this page comes from