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

Function plot_point_to_data

src/transform.rs:337–346  ·  view source on GitHub ↗
(
    point: [f64; 2],
    x_scale: AxisScale,
    y_scale: AxisScale,
)

Source from the content-addressed store, hash-verified

335}
336
337pub(crate) fn plot_point_to_data(
338 point: [f64; 2],
339 x_scale: AxisScale,
340 y_scale: AxisScale,
341) -> Option<[f64; 2]> {
342 Some([
343 plot_value_to_data(point[0], x_scale)?,
344 plot_value_to_data(point[1], y_scale)?,
345 ])
346}
347
348fn valid_log_base(base: f64) -> bool {
349 base.is_finite() && base > 0.0 && (base - 1.0).abs() > f64::EPSILON

Callers 2

cursor_world_dataMethod · 0.70

Calls 1

plot_value_to_dataFunction · 0.85

Tested by

no test coverage detected