small code changes
This commit is contained in:
10
src/misc.rs
10
src/misc.rs
@@ -1,4 +1,4 @@
|
||||
use eframe::egui::plot::Value as EguiValue;
|
||||
use eframe::egui::plot::{Line, Points, Value as EguiValue, Values};
|
||||
use itertools::Itertools;
|
||||
use serde_json::Value as JsonValue;
|
||||
|
||||
@@ -148,6 +148,14 @@ impl From<Vec<f64>> for SteppedVector {
|
||||
}
|
||||
}
|
||||
|
||||
/// Converts Vector of egui `Value` into `Points`
|
||||
pub fn vec_tuple_to_points(data: Vec<EguiValue>) -> Points {
|
||||
Points::new(Values::from_values(data))
|
||||
}
|
||||
|
||||
/// Converts Vector of egui `Value` into `Line`
|
||||
pub fn vec_tuple_to_line(data: Vec<EguiValue>) -> Line { Line::new(Values::from_values(data)) }
|
||||
|
||||
#[derive(PartialEq, Debug)]
|
||||
pub struct JsonFileOutput {
|
||||
pub help_expr: String,
|
||||
|
||||
Reference in New Issue
Block a user