Function Rect.intersectRect

Wraps SDL_IntersectRect which attempts to get the rectangle of intersection between two dsdl2.Rects

std.typecons.Nullable!(dsdl2.rect.Rect) intersectRect (
  Rect other
) @trusted const;

Parameters

NameDescription
other other dsdl2.Rect with which the dsdl2.Rect is intersected

Returns

non-null Nullable!Rect instance if intersection is present, otherwise a null one