cleanup
This commit is contained in:
parent
c45386e05a
commit
6b500292a3
@ -22,10 +22,13 @@ lto = true
|
||||
[dependencies]
|
||||
meval = { git = "https://github.com/Titaniumtown/meval-rs.git" }
|
||||
eframe = { git = "https://github.com/Titaniumtown/egui", branch = "patch-1", default-features = false, features = ["egui_glow"] }
|
||||
instant = { version = "0.1.12", features = ["wasm-bindgen"] }
|
||||
git-version = "0.3.5"
|
||||
|
||||
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
||||
instant = { version = "0.1.12" }
|
||||
|
||||
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
||||
instant = { version = "0.1.12", features = ["wasm-bindgen"] }
|
||||
console_error_panic_hook = "0.1.7"
|
||||
wee_alloc = "0.4.5"
|
||||
wasm-bindgen = { version = "0.2.79", default-features = false, features = ["std"] }
|
||||
|
||||
@ -6,7 +6,7 @@ use eframe::{egui, epi};
|
||||
use egui::plot::{Line, Plot, Values};
|
||||
use egui::widgets::plot::BarChart;
|
||||
use egui::widgets::Button;
|
||||
use egui::{Color32, Vec2, FontData, FontFamily};
|
||||
use egui::{Color32, FontData, FontFamily, Vec2};
|
||||
use git_version::git_version;
|
||||
|
||||
// Grabs git version on compile time
|
||||
@ -83,18 +83,12 @@ impl epi::App for MathApp {
|
||||
"Ubuntu-Light".to_owned(),
|
||||
FontData::from_static(include_bytes!("Ubuntu-Light.ttf")),
|
||||
);
|
||||
fonts.families.insert(
|
||||
FontFamily::Monospace,
|
||||
vec![
|
||||
"Ubuntu-Light".to_owned(),
|
||||
],
|
||||
);
|
||||
fonts.families.insert(
|
||||
FontFamily::Proportional,
|
||||
vec![
|
||||
"Ubuntu-Light".to_owned(),
|
||||
],
|
||||
);
|
||||
fonts
|
||||
.families
|
||||
.insert(FontFamily::Monospace, vec!["Ubuntu-Light".to_owned()]);
|
||||
fonts
|
||||
.families
|
||||
.insert(FontFamily::Proportional, vec!["Ubuntu-Light".to_owned()]);
|
||||
|
||||
ctx.set_fonts(fonts);
|
||||
|
||||
|
||||
@ -52,15 +52,15 @@ impl Clone for Function {
|
||||
Self {
|
||||
function: Box::new(func),
|
||||
func_str: self.func_str.clone(),
|
||||
min_x: self.min_x.clone(),
|
||||
max_x: self.max_x.clone(),
|
||||
pixel_width: self.pixel_width.clone(),
|
||||
min_x: self.min_x,
|
||||
max_x: self.max_x,
|
||||
pixel_width: self.pixel_width,
|
||||
back_cache: self.back_cache.clone(),
|
||||
front_cache: self.front_cache.clone(),
|
||||
integral: self.integral.clone(),
|
||||
integral_min_x: self.integral_min_x.clone(),
|
||||
integral_max_x: self.integral_max_x.clone(),
|
||||
integral_num: self.integral_num.clone(),
|
||||
integral: self.integral,
|
||||
integral_min_x: self.integral_min_x,
|
||||
integral_max_x: self.integral_max_x,
|
||||
integral_num: self.integral_num,
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -182,7 +182,7 @@ impl Function {
|
||||
.clone()
|
||||
.iter()
|
||||
.filter(|ele| (ele.x >= min_x) && (min_x >= ele.x))
|
||||
.map(|ele| *ele)
|
||||
.copied()
|
||||
.collect();
|
||||
|
||||
let x_to_go = match movement_right {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user