Function Rect.intersectRect

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

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

Parameters

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

Returns

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