main/src/georegression/metric/Intersection2D_I32.java
public static boolean intersection( Rectangle2D_I32 a , Rectangle2D_I32 b , Rectangle2D_I32 result ) {
		if( !intersects(a,b) )
			return false;

		result.x0 = Math.max(a.x0,b.x0);
		result.x1 = Math.min(a.x1, b.x1);
		result.y0 = Math.max(a.y0,b.y0);
		result.y1 = Math.min(a.y1,b.y1);

		return true;
	}
public static boolean intersection( Rectangle2D_I32 a , Rectangle2D_I32 b , Rectangle2D_I32 result ) {
		if( !intersects(a,b) )
			return false;

		result.x0 = Math.max(a.x0,b.x0);
		result.x1 = Math.min(a.x1, b.x1);
		result.y0 = Math.max(a.y0,b.y0);
		result.y1 = Math.min(a.y1,b.y1);

		return true;
	}
public static boolean intersection ( Rectangle2D_I32 a , Rectangle2D_I32 b , Rectangle2D_I32 result ) { if ( ! intersects ( a , b ) ) return false ; result . x0 = Math . max ( a . x0 , b . x0 ) ; result . x1 = Math . min ( a . x1 , b . x1 ) ; result . y0 = Math . max ( a . y0 , b . y0 ) ; result . y1 = Math . min ( a . y1 , b . y1 ) ; return true ; }
Finds the intersection between two rectangles.  If the rectangles don't intersect then false is returned.

@param a Rectangle
@param b Rectangle
@param result Storage for the found intersection
@return true if intersection
Finds the intersection between two rectangles . If the rectangles don t intersect then false is returned .