sdlHasRectIntersectionFloat function

bool sdlHasRectIntersectionFloat(
  1. Pointer<SdlFRect> a,
  2. Pointer<SdlFRect> b
)

Determine whether two rectangles intersect with float precision.

If either pointer is NULL the function will return false.

\param A an SDL_FRect structure representing the first rectangle. \param B an SDL_FRect structure representing the second rectangle. \returns true if there is an intersection, false otherwise.

\since This function is available since SDL 3.1.3.

\sa SDL_GetRectIntersection

extern SDL_DECLSPEC bool SDLCALL SDL_HasRectIntersectionFloat(const SDL_FRect *A, const SDL_FRect *B)

Implementation

bool sdlHasRectIntersectionFloat(Pointer<SdlFRect> a, Pointer<SdlFRect> b) {
  final sdlHasRectIntersectionFloatLookupFunction = libSdl3.lookupFunction<
      Uint8 Function(Pointer<SdlFRect> a, Pointer<SdlFRect> b),
      int Function(Pointer<SdlFRect> a,
          Pointer<SdlFRect> b)>('SDL_HasRectIntersectionFloat');
  return sdlHasRectIntersectionFloatLookupFunction(a, b) == 1;
}