Skip to main content

SDL_GetRectIntersectionFloat

Function SDL_GetRectIntersectionFloat 

Source
pub unsafe extern "C" fn SDL_GetRectIntersectionFloat(
    A: *const SDL_FRect,
    B: *const SDL_FRect,
    result: *mut SDL_FRect,
) -> bool
Expand description

Calculate the intersection of two rectangles with float precision.

If result is NULL then this function will return false.

§Parameters

  • A: an SDL_FRect structure representing the first rectangle.
  • B: an SDL_FRect structure representing the second rectangle.
  • result: an SDL_FRect structure filled in with the intersection of rectangles A and B.

§Return value

Returns true if there is an intersection, false otherwise.

§Thread safety

It is safe to call this function from any thread.

§Availability

This function is available since SDL 3.2.0.

§See also