Find if a point is in a circle

I am coding a video game, but I am not so good at the math. I am hoping for some help here:

Given:

• $X, Y$ that is the center of the Circle
• $R$ that is the radius of the Circle
• $X_1, Y_1$ that may or may not be in the circle.

The idea is that I have a tower that will shoot at a bad guy when it comes in range. The bad guy has an $X_1, Y_1$ coordinate that will continually update.

I need an equation I can run to see if the bad guy is in range.

-

$(X-X_1)^2+(Y-Y_1)^2\leq R^2$ is true if and only if the bad guy is in range, since the distance between $(X,Y)$ and $(X_1,Y_1)$ is $\sqrt{(X-X_1)^2+(Y-Y_1)^2}$.
The circle is defined by all points $(x_1, y_1)$ satisfying $(x_1-x)^{2} + (y_1-y)^{2} \le R^{2}$. That is your logical condition to test if someone is in the circle.