There is a point A at (x,y). How do I get list of all points within a circle of centre A in the radius r? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

There is a point A at (x,y). How do I get list of all points within a circle of centre A in the radius r?

If (80,40) is A and radius is 5, then I need list of all points within a curvle of radius 5 with (80,40) as centre on a cartician plane.

29th Apr 2021, 2:41 PM
NightSkyLeaf
NightSkyLeaf - avatar
2 Answers
+ 1
The radius is 5. If a point is in the circle, the length from that point to the centre should be less than 5, right? You can get the length with sqrt(x*x+y*y)
29th Apr 2021, 2:47 PM
你知道規則,我也是
你知道規則,我也是 - avatar
0
thanks
29th Apr 2021, 3:11 PM
NightSkyLeaf
NightSkyLeaf - avatar