fn transform_y_coordinates(draw_info: &mut DrawInfo) {
    if let Some(scale_factor_y) = draw_info.scale_factor_y {
        for point in &mut draw_info.points {
            let delta = point.y;
            point.y = (draw_info.max_delta - delta) * scale_factor_y + draw_info.padding_y;
            if draw_info.flip_graph {
                point.y = HEIGHT - point.y;
            }
        }
    } else {
        for point in &mut draw_info.points {
            point.y = DEFAULT_X_AXIS;
        }
    }
}
/// Before calling this function, the deltas are stored as the points'.
/// y-coordinates. This will calculate the actual y-coordinates and replace the
/// deltas. The reason why this can't be done in the first loop is that
/// `min_`/`max_delta` is not known yet at that point in time.
Before calling this function, the deltas are stored as the points'.
y-coordinates. This will calculate the actual y-coordinates and replace the
deltas. The reason why this can't be done in the first loop is that
`min_`/`max_delta` is not known yet at that point in time.
Before calling this function the deltas are stored as the points ' . y - coordinates . This will calculate the actual y - coordinates and replace the deltas . The reason why this can ' t be done in the first loop is that ` min_ ` / ` max_delta ` is not known yet at that point in time .
fn transform_y_coordinates(draw_info: &mut DrawInfo) {
    if let Some(scale_factor_y) = draw_info.scale_factor_y {
        for point in &mut draw_info.points {
            let delta = point.y;
            point.y = (draw_info.max_delta - delta) * scale_factor_y + draw_info.padding_y;
            if draw_info.flip_graph {
                point.y = HEIGHT - point.y;
            }
        }
    } else {
        for point in &mut draw_info.points {
            point.y = DEFAULT_X_AXIS;
        }
    }
}
fn transform_y_coordinates ( draw_info : & mut DrawInfo ) { if let Some ( scale_factor_y ) = draw_info . scale_factor_y { for point in & mut draw_info . points { let delta = point . y ; point . y = ( draw_info . max_delta - delta ) * scale_factor_y + draw_info . padding_y ; if draw_info . flip_graph { point . y = HEIGHT - point . y ; } } } else { for point in & mut draw_info . points { point . y = DEFAULT_X_AXIS ; } } }
Before calling this function, the deltas are stored as the points'.
Before calling this function the deltas are stored as the points ' .
draw_info
&mut DrawInfo
draw_info
&mut DrawInfo