Rect::&

Rect::&
inline const Rect<T> operator &(const Rect<T> & r) const;
Description

The operator & function determines the intersection of two rectangles by comparing their components and selecting the right-most x1, bottom-most y1, Left-most x2, and top-most y2. The following expression is used to determine the result:

   (result.x1, result.y1, result.x2, result.y2) = (max(r1.x1, r2.x1), max(r1.y1, r2.y1), min(r1.x2, r2.x2), min(r1.y2, r2.y2)
Parameters
Parameters 
Description 
const Rect<T> & r 
The second of two passed rectangles whose components are compared to those of the first rectangle in order to determine the intersection. 
Return Value

A new Rect whose components are determined by the intersection of two passed rectangles.