Calculate the distance of the point from the center of the circle.
Distance# = Sqr((Px#-Cx#)^2 + (Py#-Cy#)^2)
If Distance# < Radius# Then InCircle()
Radius# is half the width of the circle.
If on the other hand you want to know if two circles collide, then do this:
Calculate distance between circle centers:
Distance# = Sqr((C2x#-C1x#)^2 + (C2y#-C1y#)^2)
If Distance# < (Radius1#+Radius2#) Then Colliding()
Distance# = Sqr((Px#-Cx#)^2 + (Py#-Cy#)^2)
If Distance# < Radius# Then InCircle()
Radius# is half the width of the circle.
If on the other hand you want to know if two circles collide, then do this:
Calculate distance between circle centers:
Distance# = Sqr((C2x#-C1x#)^2 + (C2y#-C1y#)^2)
If Distance# < (Radius1#+Radius2#) Then Colliding()