MCPcopy Create free account
hub / github.com/donkeyteethUX/iced_plot / y_at_x_in_segment

Function y_at_x_in_segment

src/plot_state.rs:1037–1052  ·  view source on GitHub ↗
(points: &[[f64; 2]], seg_idx: usize, x: f64)

Source from the content-addressed store, hash-verified

1035fn transformed_series_points(
1036 series: &crate::Series,
1037 x_axis_scale: AxisScale,
1038 y_axis_scale: AxisScale,
1039 axis_ranges: ([f64; 2], [f64; 2]),
1040) -> Vec<[f64; 2]> {
1041 series
1042 .positions
1043 .iter()
1044 .filter_map(|&p| {
1045 data_point_to_plot_with_transform(
1046 p,
1047 x_axis_scale,
1048 y_axis_scale,
1049 &series.transform,
1050 Some(axis_ranges),
1051 )
1052 })
1053 .collect()
1054}
1055

Calls 1

getMethod · 0.80

Tested by

no test coverage detected