SDL_GetRectUnionFloat(3)
β¨ SDL_GetRectUnionFloat β¨
okay bestie, so this one is SDL_GetRectUnionFloat(3) from the SDL3 functions lineup, and it's literally the girl who takes two rectangles and smushes them into one big rectangle that covers both. no cap. π«Ά
πΈ NAME πΈ
SDL_GetRectUnionFloat β calculate the union of two rectangles with float precision π
like... float precision. she's precise. she's delicate. she's giving math girlboss.
π SYNOPSIS π
#include <SDL3/SDL_rect.h>
bool SDL_GetRectUnionFloat(const SDL_FRect *A, const SDL_FRect *B, SDL_FRect *result);
π¦ FUNCTION PARAMETERS π¦
Aβ anSDL_FRectstructure that's holding your first rectangle. first queen energy πBβ anSDL_FRectstructure holding your second rectangle. the other one. equally valid. πresultβ anSDL_FRectstructure that gets filled in with the union of rectanglesAandB. yes bestie, she writes into your struct. that's the whole point. π
π RETURN VALUE π
- Returns
trueon success - Returns
falseon failure
and if it's giving failure, you go call SDL_GetError() for more information. that's your 411, that's your tea, that's where the lore lives π
π THREAD SAFETY π
It is safe to call this function from any thread.
periodt. no locks, no drama, no "wait your turn" β any thread, any time. iconic. β¨
β AVAILABILITY β
This function is available since SDL 3.2.0. so if you're on something older, she's not there yet, don't gaslight yourself π
ngl the vibes here are immaculate: two rects walk in, one bigger rect walks out, everybody claps. no cap. π§
Simple Directmedia Layer β SDL 3.4.18 β SDL_GetRectUnionFloat(3)
that's the whole page bestie, mwah π go union some rectangles, you're gonna eat π₯π
π¦ 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