Function Rect.hasLineIntersection

Wraps SDL_IntersectRectAndLine which sees whether a line intersects with the dsdl.Rect

bool hasLineIntersection (
  Point[2] line
) @trusted const;

Parameters

NameDescription
line set of two dsdl.Points denoting the start and end coordinates of the line to check its intersection of with the dsdl.Rect

Returns

true if it intersects, otherwise false