SDL_fmodf(3)
β¨ SDL_fmodf(3) β¨
okay bestie, welcome to the SDL3 FUNCTIONS section of the manual π this one's a lil baby function and she's lowkey adorable, let's get into it
πΈ NAME πΈ
SDL_fmodf β return the floating-point remainder of x / y π
π¦ SYNOPSIS π¦
#include <SDL3/SDL_stdinc.h>
float SDL_fmodf(float x, float y);
π DESCRIPTION π
So the way this works is: you divide x by y, and you get back the remainder. that's it. that's the whole vibe β¨
Here's the domain (aka what you're allowed to feed her):
-INF <= x <= INF-INF <= y <= INFy != 0
And the range (aka what she'll hand back to you):
-y <= z <= y
π¨ bestie, do NOT passy = 0. the domain literally saysy != 0, so likeβ¦ don't. π
This function operates on single-precision floating point values, so if you're on double-precision floats you want SDL_fmod instead, okay? iykyk π§
π FUNCTION PARAMETERS π
xβ the numerator πyβ the denominator. Must not be 0. like fr fr. zero is not invited.
π RETURN VALUE π
Returns the remainder of x / y. slay. periodt π
π THREAD SAFETY π
It is safe to call this function from any thread. main character energy across every thread, no cap π«Ά
β AVAILABILITY β
This function is available since SDL 3.2.0. so she's not ancient, she's just well-established β¨
π SEE ALSO π
and that's the whole page, bestie!! π this icon was brought to you by Simple Directmedia Layer, running SDL 3.4.18, and the page is literally just SDL_fmodf(3). go divide something and enjoy your remainder ππΈπ¦
π¦ 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