fn draw_segments(draw: &Draw, model: &Model) {
  // TODO: explore having a random radians_per_segment
  let radians_per_segment = (2. * PI) / model.n_segments as f32;
  for n in 0..model.n_segments {
    let start_theta = n as f32 * radians_per_segment;
    let end_theta = (n + 1) as f32 * radians_per_segment;
    // draw_segments_for_radians(draw, start_theta, end_theta, model);
    for (min_rad, max_rad, hue) in calculate_segments_for_radians(model) {
      draw_segment(
        hue,
        model.sat,
        model.lum,
        min_rad,
        max_rad,
        start_theta,
        end_theta,
        draw,
      );
    }
  }
}
/// draw all segments around the circle
draw all segments around the circle
draw all segments around the circle
fn draw_segments(draw: &Draw, model: &Model) {
  // TODO: explore having a random radians_per_segment
  let radians_per_segment = (2. * PI) / model.n_segments as f32;
  for n in 0..model.n_segments {
    let start_theta = n as f32 * radians_per_segment;
    let end_theta = (n + 1) as f32 * radians_per_segment;
    // draw_segments_for_radians(draw, start_theta, end_theta, model);
    for (min_rad, max_rad, hue) in calculate_segments_for_radians(model) {
      draw_segment(
        hue,
        model.sat,
        model.lum,
        min_rad,
        max_rad,
        start_theta,
        end_theta,
        draw,
      );
    }
  }
}
fn draw_segments ( draw : & Draw , model : & Model ) { // TODO: explore having a random radians_per_segment let radians_per_segment = ( 2. * PI ) / model . n_segments as f32 ; for n in 0 .. model . n_segments { let start_theta = n as f32 * radians_per_segment ; let end_theta = ( n + 1 ) as f32 * radians_per_segment ; // draw_segments_for_radians(draw, start_theta, end_theta, model); for ( min_rad , max_rad , hue ) in calculate_segments_for_radians ( model ) { draw_segment ( hue , model . sat , model . lum , min_rad , max_rad , start_theta , end_theta , draw , ) ; } } }
draw all segments around the circle
draw all segments around the circle
draw
&Draw
model
&Model