Skip to main content

circle

Function circle 

Source
pub fn circle(
    center: &GeoCoord,
    radius_m: f64,
    segments: usize,
) -> Vec<GeoCoord>
Expand description

Generate a circle as a closed polygon ring.

ยงArguments

  • center โ€“ centre of the circle.
  • radius_m โ€“ radius in meters.
  • segments โ€“ number of line segments (more = smoother). Clamped to a minimum of 4.

The returned ring is closed (first == last) and counter-clockwise.