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