TRUNC(3G)
π 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: β
sogenTypeshowed up in1.30and never left, butgenDTypewas a whole late bloomer β she didn't arrive until4.00. we love a delayed glow-up π
π SEE ALSO π
floor()round()
π COPYRIGHT π
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 π
(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
- ubuntu jammy: opengl-4-man-doc 1.0~svn33624-1 Β· SGI-Free-Software-B-License-2
- ubuntu noble: opengl-4-man-doc 1.0~svn33624-1 Β· SGI-Free-Software-B-License-2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms