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!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
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 Respostas
+ 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