wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

rect_intersect_p.c (297B)


      1 /* Copyright ©2006-2010 Kris Maglione <maglione.k at Gmail>
      2  * See LICENSE file for license details.
      3  */
      4 #include <stuff/geom.h>
      5 
      6 bool
      7 rect_intersect_p(Rectangle r, Rectangle r2) {
      8 	return r.min.x <= r2.max.x
      9 	    && r.max.x >= r2.min.x
     10 	    && r.min.y <= r2.max.y
     11 	    && r.max.y >= r2.min.y;
     12 }