is Rectangle Intersect - Android Graphics

Android examples for Graphics:Rectangle

Description

is Rectangle Intersect

Demo Code


//package com.java2s;
import android.graphics.RectF;

public class Main {

    public static boolean isIntersect(RectF a, RectF b) {
        return a.left <= b.right && b.left <= a.right && a.top <= b.bottom
                && b.top <= a.bottom;
    }//from   w w w  .jav a  2  s.co m
}

Related Tutorials