SDL_GetRectUnion(3)
β¨ SDL_GetRectUnion β¨
okay so bestie, welcome to the SDL_GetRectUnion page of the SDL3 FUNCTIONS manual π this one's a lil math baddie and honestly? she eats.
π NAME π
SDL_GetRectUnion β calculate the union of two rectangles. that's it, that's the whole job, and she does it flawlessly π
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_rect.h>
bool SDL_GetRectUnion(const SDL_Rect *A, const SDL_Rect *B, SDL_Rect *result);
like. look at her. three pointers, one bool, zero drama β¨
π¦ FUNCTION PARAMETERS π¦
Aβ anSDL_Rectstructure representing the first rectangle. rect number one, the OG, the main character πBβ anSDL_Rectstructure representing the second rectangle. rect number two, here to get merged with her bestie π«Άresultβ anSDL_Rectstructure that gets filled in with the union of rectanglesAandB. note the vibe: she writes into this one, she doesn't just read it. it's giving output parameter energy π
β RETURN VALUE β
Returns true on success or false on failure π and if you got the false? you gotta call SDL_GetError() for more information, no cap. that's where the tea is π
π₯ THREAD SAFETY π₯
It is safe to call this function from any thread. literally any of them. go wild, be free, thread it up πβ¨
π AVAILABILITY π
This function is available since SDL 3.2.0. so if you're on something older, sorry babe, she's not there yet π
ngl there's no SEE ALSO section on this page, so we're just gonna sit here and appreciate her on her own π
and that's the whole page, bestie!! this came to you straight from the Simple Directmedia Layer crew, version SDL 3.4.18, and it's the SDL_GetRectUnion(3) page π mwah, go union some rectangles, ily ππ¦β¨
π¦ 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