SDL_isinf(3)

SDL_isinf(3) πŸ’– is it infinity tho??

okay bestie, gather round, because today we're checking if a double is literally infinity ✨ this is a page from the SDL3 FUNCTIONS collection, and honestly? it's giving short and iconic.


NAME πŸŽ€

SDL_isinf β€” return whether the value is infinity.

like. that's it. that's the whole job. is it infinity? yes or no. πŸ’…


SYNOPSIS ✨

#include <SDL3/SDL_stdinc.h>

int SDL_isinf(double x);

FUNCTION PARAMETERS πŸ¦‹

  • x β€” a double-precision floating point value. that's the little guy we're interrogating πŸ•΅οΈβ™€οΈ

RETURN VALUE 🌸

returns non-zero if the value is infinity, and 0 otherwise. so like, truthy or falsy, no in-between, periodt πŸ’œ

lowkey important: it says non-zero, not 1. don't go comparing it to 1 exactly, bestie, that's not the vibe the docs are promising 🫢

THREAD SAFETY πŸ‘‘

it is safe to call this function from any thread. no locks, no drama, no main-character-only rules. call it from wherever you want, she doesn't care πŸ’…βœ¨


AVAILABILITY 🌈

this function has been available since SDL 3.2.0. so if you're on something older… girl. upgrade 😭


SEE ALSO πŸ”₯

  • SDL_isinff(3) β€” the float version, for when your number is single-precision and also needs a vibe check πŸ“

okay that's the whole page, no cap. now go forth and check your infinities responsibly πŸ’–

Simple Directmedia Layer β€” SDL 3.4.18 β€” mwah, tysm for reading, this has been your girl SDL_isinf(3), signing off πŸŽ€βœ¨πŸ’œ

πŸ“¦ where this page comes from