Java tutorial
//package com.java2s; public class Main { public static boolean isCircleHit(int x, int y, int radius, int left, int top, int width, int height) { int x2 = left + width / 2; int y2 = top + height / 2; if (Math.abs(x - x2) < (radius + width / 2) && Math.abs(y - y2) < (radius + height / 2)) { return true; } return false; } }