is Point In Rect - Java java.lang

Java examples for java.lang:Math Geometry Shape

Description

is Point In Rect

Demo Code


//package com.java2s;

public class Main {
    public static boolean isPointInRect(float px, float py, float rx,
            float ry, float rw, float rh) {
        if (px < rx || px > rx + rw || py < ry || py > ry + rh)
            return false;
        return true;
    }/*  w  w  w.j a v  a  2  s  .  c  o m*/
}

Related Tutorials