CEIL(3G)
okay bestie, sit down, we're doing math π this is the CEIL(3G) page, straight out of the [FIXME: manual] manual, and honestly? it's giving "short and iconic." no notes. let's get into it.
πΈ NAME πΈ
ceil β find the nearest integer that is greater than or equal to the parameter
like, the ceiling. the roof. the vibes above you. π β¨
β¨ DECLARATION β¨
here's the whole thing, verbatim, don't @ me:
genType ceil(genType x);
genDType ceil(genDType x);
two flavors: the regular girlies (genType) and the double-precision divas (genDType). π
π PARAMETERS π
xβ specify the value to evaluate. that's it. that's the input. hand it over and letceilcook. π
π DESCRIPTION π
okay so the whole plot of this function: ceil returns a value equal to the nearest integer that is greater than or equal to x.
that's the entire lore. it takes your little float and rounds it up to the next whole number, no matter how close it already was. x already a whole number? bestie it stays exactly the same, ceil is not gonna inflate your ego. π₯
π VERSION SUPPORT π
the glow-up timeline, aka which OpenGL Shading Language versions said yes to which signature. the columns are the versions: 1.10, 1.20, 1.30, 1.40, 1.50, 3.30, 4.00, 4.10, 4.20, 4.30, 4.40, 4.50.
ceil (genType) β supported everywhere, day one, never missed a single era. β in:
1.101.201.301.401.503.304.004.104.204.304.404.50
ceil (genDType) β late bloomer era π. absent for the early years, then absolutely ate from 4.00 onward.
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 if you're on anything older than 4.00 and you're out here calling the double-precision version, that's a no from the compiler. π«Ά
π¦ SEE ALSO π¦
the rest of the friend group, go say hi:
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 π
Copyright Β© 2011-2014 Khronos Group
and that's the whole page, no cap. π§ run it back whenever you need a ceiling.
signing off from [FIXME: source], dated 01/03/2018, page CEIL(3G) β stay rounded up, 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