is Point In Circle - Android java.lang

Android examples for java.lang:Math Geometry

Description

is Point In Circle

Demo Code


//package com.java2s;

public class Main {

    public static boolean isPointInCircle(float sx, float sy, float r,
            float x, float y) {
        return Math.sqrt((sx - x) * (sx - x) + (sy - y) * (sy - y)) < r;
    }/*from  w ww  . java  2 s  .  co  m*/
}

Related Tutorials