rewrite progress

This commit is contained in:
Simon Gardling
2022-02-25 09:47:41 -05:00
parent 27601d7ddd
commit 0c538cb7fd
6 changed files with 196 additions and 28 deletions

View File

@@ -34,6 +34,7 @@ pub struct MathApp {
}
impl Default for MathApp {
#[inline]
fn default() -> Self {
let def_func = "x^2".to_string();
let def_min_x = -10.0;
@@ -102,15 +103,19 @@ impl MathApp {
}
impl epi::App for MathApp {
// The name of the program (displayed when running natively as the window title)
fn name(&self) -> &str { "Integral Demonstration" }
/// Called once before the first frame.
// Called once before the first frame.
#[inline]
fn setup(
&mut self, _ctx: &egui::Context, _frame: &epi::Frame, _storage: Option<&dyn epi::Storage>,
) {
}
/// Called each time the UI needs repainting, which may be many times per second.
// Called each time the UI needs repainting, which may be many times per second.
#[inline]
fn update(&mut self, ctx: &egui::Context, _frame: &epi::Frame) {
let Self {
func_str,