SDL_ceil(3)
π SDL_ceil(3) π
okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, where we round numbers UP and feel amazing about it β¨
πΈ NAME πΈ
SDL_ceil β compute the ceiling of x. that's it. that's the whole job. and she does it flawlessly π
π SYNOPSIS π
#include <SDL3/SDL_stdinc.h>
double SDL_ceil(double x);
π¦ DESCRIPTION π¦
so here's the tea β β the ceiling of x is the smallest integer y such that y >= x. in normal human words? it's x rounded up to the nearest integer. always up. she does not care how close you are to the floor, she is taking you to the ceiling, no cap π₯
Domain: -INF <= x <= INF
Range: -INF <= y <= INF, y integer
heads up though: this one operates on double-precision floating point values. if you're working with single-precision floats, you want SDL_ceilf instead, iykyk π«Ά
π FUNCTION PARAMETERS π
xβ a floating point value. just hand her your number, she'll take it from there π
β RETURN VALUE β
Returns the ceiling of x. literally what you asked for, delivered with main character energy π
π§ THREAD SAFETY π§
It is safe to call this function from any thread. go wild, call her from everywhere, she's built different π
π AVAILABILITY π
This function is available since SDL 3.2.0. if your SDL is older than that, bestie... it's giving vintage π
π SEE ALSO π
and that's the whole page!! mwah π this came to you from Simple Directmedia Layer, version SDL 3.4.18 β go forth and round up, bestie, you ate πβ¨
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms