Skip to content

Commit

Permalink
Changed this to adapt to better graph function
Browse files Browse the repository at this point in the history
  • Loading branch information
importly committed Mar 10, 2021
1 parent c2922e6 commit 617edb2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 0 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ edition = "2018"

[dependencies]
fltk = "^0.15"
mathical = "0.1.2"
mathical = {path = "../mathical"}
6 changes: 5 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
use fltk::*;
use mathical::{self, cli};

fn functioner(x: f64) -> f64 {
x * x
}

fn main() {
let app = app::App::default();

let mut win = window::Window::new(100, 100, 740, 580, "Mathical GUI");

let mut graph = button::Button::new(160, 210, 80, 40, "Graph");

graph.set_callback(move || cli::graph::graph());
graph.set_callback(move || cli::graph::graph(functioner));

win.end();
win.show();
Expand Down

0 comments on commit 617edb2

Please sign in to comment.