SDL_isnan(3)

πŸ’– SDL_isnan πŸ’–

okay bestie, welcome to SDL_isnan(3) β€” yes it's a real page in the SDL3 FUNCTIONS lineup and yes it's exactly as unhinged-and-simple as it sounds. sit with me for like thirty seconds and you'll be a NaN-detecting icon, fr fr.


✨ NAME ✨

SDL_isnan β€” Return whether the value is NaN.

like... is it Not a Number or is it a Number? this function is the vibe check. πŸ¦‹


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_stdinc.h>

int SDL_isnan(double x);

πŸŽ€ FUNCTION PARAMETERS πŸŽ€

  • x β€” a double-precision floating point value. just hand her your double and let her look at it. πŸ’…

⭐ RETURN VALUE ⭐

Returns non-zero if the value is NaN, and 0 otherwise.

that's it. that's the whole personality. non-zero = yes it's NaN, 0 = nope, it's a normal little number, carry on. 🫢


🧚 THREAD SAFETY 🧚

It is safe to call this function from any thread.

not me being fully thread-safe and unbothered 😭 go ahead, call her from literally anywhere, she does not care. queen behavior. πŸ‘‘

🌈 AVAILABILITY 🌈

This function is available since SDL 3.2.0.

so if you're on anything older, bestie... it's giving nothing. upgrade era. ✨


πŸ”₯ SEE ALSO πŸ”₯

iykyk β€” that's the float sibling, go say hi. πŸ’œ


okay that's the whole page, you ate it, mwah πŸ’‹ this cutie lives in Simple Directmedia Layer, documented for SDL 3.4.18 β€” go forth and detect your NaNs, bestie, and stay iconic. πŸŒΈπŸŽ€πŸ¦‹

πŸ“¦ where this page comes from