Get all points in circle

BlitzMax Forums/BlitzMax Programming/Get all points in circle

Think that must do it...
Function PointsInCircle:byte(X:Int, Y:Int, circlex:Int, circley:Int, radius:Int)
    Local posX:Int, posY:Int  
    local pointIsInside:byte=0
	For posX = X - radius To x + radius
  	   For posY = Y - radius To Y + radius
  	     ' within the circle?
	     If Sqr((posX - X)^2 + (posY - Y)^2) <= radius Then
	       'i'm within the circle... do something	
		   'my position is: posX-x,posY-y
                  pointIsInside=true
		 EndIf
	   Next
	Next
  return pointIsInside 
End Function



bye
MB