1 /// <Summary> 2 /// Whether the vertex is in the circle (or in the circle on the edge) 3 /// </Summary> 4 /// <Param name = "cpoint"> Center Coordinate </Param> 5 /// <Param name = "cradius"> Circle radius </Param> 6 /// <Param name = "point"> Current point </Param> 7 /// <Returns> </returns> 8 Public Static Bool Whether the vertex is in the circle (vector2d cpoint,Double Cradius, vector2d point) 9 { 10 Double Distance = math. SQRT (math. Pow (math. Abs (point. X-cpoint. X ), 2 ) + Math. Pow (math. Abs (point. Y-cpoint. Y ), 2 )); 11 Return Distance <= Cradius; 12 } 13 14 /// <Summary> 15 /// Whether the vertex is in the circle (or in the circle on the edge) 16 /// </Summary> 17 /// <Param name = "cpoint"> Center Coordinate </Param> 18 /// <Param name = "onpoint"> Coordinates on the edges </Param> 19 /// <Param name = "point"> Current point </Param> 20 /// <Returns> </returns> 21 Public Static Bool Whether the vertex is in the circle (vector2d cpoint, vector2d onpoint, vector2d point) 22 { 23 Double Cradius = math. SQRT (math. Pow (math. Abs (onpoint. X-cpoint. X ), 2 ) + Math. Pow (math. Abs (onpoint. Y-cpoint. Y ), 2 )); 24 Double Distance = math. SQRT (math. Pow (math. Abs (point. X-cpoint. X ), 2 ) + Math. Pow (math. Abs (point. Y-cpoint. Y ), 2 )); 25 Return Distance <= Cradius; 26 }