ROUND(3G)
πΈ ROUND(3G) πΈ
okay bestie, welcome to the ROUND(3G) manual page π this is a [FIXME: manual] situation and we're gonna make it iconic anyway.
β¨ NAME β¨
round β find the nearest integer less than or equal to the parameter π
π¦ DECLARATION π¦
here's the tea, the actual signatures, copied exactly, no notes:
genType round(genType x);
genDType round(genDType x);
π PARAMETERS π
xβ Specify the value to evaluate. that's it, that's the whole vibe, she's the one being evaluated π
π DESCRIPTION π
so round returns a value equal to the nearest integer to x. simple, slay.
but β and this is the part that lowkey matters β the fraction 0.5 will round in a direction chosen by the implementation, presumably the direction that is fastest π₯. and that includes the possibility that round(x) returns the same value as roundEven()(x) for all values of x. so yeah, don't come for her about which way 0.5 goes, it's giving "implementation's choice" fr fr π
π VERSION SUPPORT π
okay so here's who's invited to the party, by OpenGL Shading Language Version π«Ά
round (genType) β main character energy, but not from the jump:
- OpenGL Shading Language Version
1.10β-(not supported π) 1.20β-(still not invited π)1.30β β (she's here! β¨)1.40β β1.50β β3.30β β4.00β β4.10β β4.20β β4.30β β4.40β β4.50β β
round (genDType) β the late arrival, fashionably late, no apologies:
- OpenGL Shading Language Version
1.10β-(nope π) 1.20β-(nope π)1.30β-(still nope π)1.40β-(nope π)1.50β-(nope π)3.30β-(nope π)4.00β β (okay she finally showed up π)4.10β β4.20β β4.30β β4.40β β4.50β β
π SEE ALSO π
go read these next, bestie, they're the supporting cast:
floor()roundEven()
π 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 Β© 2011-2014 Khronos Group
and that's the whole page, periodt π
β¨ this came from [FIXME: source], dated 01/03/2018, and yes she's still answering to ROUND(3G) π mwah, go round some numbers bestie π¦
π¦ 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