Rect.intersects

Check the intersection between two rectangles.

This overload returns the overlapped rectangle in the intersection parameter.

  1. bool intersects(Rect!(E) rectangle)
  2. bool intersects(Rect!(E) rectangle, Rect!(O) intersection)
    struct Rect(T)
    const
    bool
    intersects
    (
    E
    O
    )
    if (
    isNumeric!(E) &&
    isNumeric!(O)
    )
    if (
    isNumeric!(T)
    )

Parameters

rectangle Rect!(E)

Rectangle to test

intersection Rect!(O)

Rectangle to be filled with the intersection

Return Value

Type: bool

true if rectangles overlap, false otherwise.

Meta