You need to check the distance $d\leq \sqrt(Xp-Xc)^2+(Yp-Yc)^2$ from the center to the bad guy and since it has square root it's simpler to test $d^2\leq (Xp-Xc)^2+(Yp-Yc)^2\leq R^2$
$Xc$ and $Yc$ are 0 since they are in the center of circle the bad guy is in range if $(Xp)^2+(Yp)^2\leq R^2$
In some Java code it's look like this
public static Point[] internalPoints(Point[] points, double radius) { int countPoints = 0; for (int i = 0; i < points.length; i++) { double xp = points[i].getX(); double yp = points[i].getY(); // points are inside the circle if d^2 <= r^2 // d^2 = (Xp-Xc)^2 + (Yp-Yc)^2 // Xp and Yp is the point that should be checked // Xc and Xc is the point center (orgin) // Xc and Yc are 0 you end up with d^2 = (Xp)^2 + (Yp)^2 if (xp * xp + yp * yp <= radius * radius) { countPoints++; } } int companionVar = 0; Point[] pointsInside = new Point[countPoints]; for (int j = 0; j < countPoints; j++) { pointsInside[companionVar] = points[j]; companionVar++; } return pointsInside; }