fn draw_segments(draw: &Draw, min: f32, max: f32, n_segments: i32, x: f32, y: f32, color: Hsl) {
  // TODO: explore having a random radians_per_segment
  let radians_per_segment = (2. * PI) / n_segments as f32;
  for n in 0..n_segments {
    let start_theta = n as f32 * radians_per_segment;
    let end_theta = (n + 1) as f32 * radians_per_segment;

    let min = random_range(min, max * 0.25);

    draw_segment(draw, min, max, start_theta, end_theta, x, y, color);
  }
}
/// draw all segments around the circle
draw all segments around the circle
draw all segments around the circle
fn draw_segments(draw: &Draw, min: f32, max: f32, n_segments: i32, x: f32, y: f32, color: Hsl) {
  // TODO: explore having a random radians_per_segment
  let radians_per_segment = (2. * PI) / n_segments as f32;
  for n in 0..n_segments {
    let start_theta = n as f32 * radians_per_segment;
    let end_theta = (n + 1) as f32 * radians_per_segment;
    let min = random_range(min, max * 0.25);
    draw_segment(draw, min, max, start_theta, end_theta, x, y, color);
  }
}
fn draw_segments ( draw : & Draw , min : f32 , max : f32 , n_segments : i32 , x : f32 , y : f32 , color : Hsl ) { // TODO: explore having a random radians_per_segment let radians_per_segment = ( 2. * PI ) / n_segments as f32 ; for n in 0 .. n_segments { let start_theta = n as f32 * radians_per_segment ; let end_theta = ( n + 1 ) as f32 * radians_per_segment ; let min = random_range ( min , max * 0.25 ) ; draw_segment ( draw , min , max , start_theta , end_theta , x , y , color ) ; } }
draw all segments around the circle
draw all segments around the circle
draw
&Draw
min
f32
max
f32
n_segments
i32
x
f32
y
f32
color
Hsl