very slight optimization,... since you don't need to know the actual distance, just check it you can avoid using Sqr
change this line:
If Radius# => Sqr((dx#*dx#)+(dy#*dy#))
to this:
If Radius# * Radius# => (dx#*dx#)+(dy#*dy#)
in my quick tests it came out slightly faster, and I don't think I broke the function.
change this line:
If Radius# => Sqr((dx#*dx#)+(dy#*dy#))
to this:
If Radius# * Radius# => (dx#*dx#)+(dy#*dy#)
in my quick tests it came out slightly faster, and I don't think I broke the function.