is Point Inside Rect - Android Graphics

Android examples for Graphics:Rectangle

Description

is Point Inside Rect

Demo Code


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

public class Main {
    public static boolean isPointInsideRect(float x, float y, RectF rect) {
        return x > rect.left && x < rect.right && y > rect.top
                && y < rect.bottom;
    }// ww w. j  a va  2 s.  com
}

Related Tutorials