SDL_GetRectIntersection - Calculate the intersection of two rectangles.
Contents
Availability
This function is available since SDL 3.2.0.
Description
If result is NULL then this function will return false.
Function Parameters
A an SDL_Rect
structure representing the first rectangle.
B an SDL_Rect
structure representing the second rectangle.
result an SDL_Rect
structure filled in with the intersection of rectangles A and B .
Header File
Defined in SDL3/SDL_rect.h
Name
SDL_GetRectIntersection - Calculate the intersection of two rectangles.
Return Value
Returns true if there is an intersection, false otherwise.
See Also
•(3), SDL_HasRectIntersection(3) Simple Directmedia Layer SDL 3.2.10 SDL_GetRectIntersection(3)
Synopsis
#include"SDL3/SDL.h"boolSDL_GetRectIntersection(constSDL_Rect*A,constSDL_Rect*B,SDL_Rect*result);
