sdlGetRectIntersectionFloat function rect
Calculate the intersection of two rectangles with float precision.
If result
is NULL then this function will return false.
\param A an SDL_FRect structure representing the first rectangle.
\param B an SDL_FRect structure representing the second rectangle.
\param result an SDL_FRect structure filled in with the intersection of
rectangles A
and B
.
\returns true if there is an intersection, false otherwise.
\since This function is available since SDL 3.2.0.
\sa SDL_HasRectIntersectionFloat
extern SDL_DECLSPEC bool SDLCALL SDL_GetRectIntersectionFloat(const SDL_FRect *A, const SDL_FRect *B, SDL_FRect *result)
Implementation
bool sdlGetRectIntersectionFloat(
Pointer<SdlFRect> a,
Pointer<SdlFRect> b,
Pointer<SdlFRect> result,
) {
final sdlGetRectIntersectionFloatLookupFunction = _libSdl
.lookupFunction<
Uint8 Function(
Pointer<SdlFRect> a,
Pointer<SdlFRect> b,
Pointer<SdlFRect> result,
),
int Function(
Pointer<SdlFRect> a,
Pointer<SdlFRect> b,
Pointer<SdlFRect> result,
)
>('SDL_GetRectIntersectionFloat');
return sdlGetRectIntersectionFloatLookupFunction(a, b, result) == 1;
}