is Point inside RectF - Android java.lang

Android examples for java.lang:Math Geometry

Description

is Point inside RectF

Demo Code


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

public class Main {
    public static boolean inside(float x, float y, RectF rect) {

        return x >= rect.left && x <= rect.right && y >= rect.top
                && y <= rect.bottom;
    }//from  w  ww  .  ja  va  2 s  .  c  o  m
}

Related Tutorials