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, out Rect!(O) intersection)
    struct Rect(T)
    bool
    intersects
    const
    (
    E
    O
    )
    if (
    isNumeric!(E) &&
    isNumeric!(O)
    )
    if (
    isNumeric!(T)
    )

Parameters

rectangle
Type: Rect!(E)

Rectangle to test

intersection
Type: Rect!(O)

Rectangle to be filled with the intersection

Return Value

Type: bool

true if rectangles overlap, false otherwise.

Meta