Find if points are within a circle with given center and radius

后端 未结 5 1423
别那么骄傲
别那么骄傲 2021-02-06 12:32

We have a point (x,y) and a set of some other points (xi,yi). How can we determine which of (xi,yi) are within a circle with c

5条回答
  •  暖寄归人
    2021-02-06 13:14

    Simple way.

    Compute the distance from the point to the center of the circle. If less than radius , then its within the circle.

提交回复
热议问题