aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lex/mod.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lex/mod.rs b/src/lex/mod.rs
index e12f327..8348e72 100644
--- a/src/lex/mod.rs
+++ b/src/lex/mod.rs
@@ -87,6 +87,9 @@ fn get_functions() -> HashMap<&'static str, Token> {
87 ("sqrt", Function::token_from_fn("sqrt".into(), |x| x.sqrt())), 87 ("sqrt", Function::token_from_fn("sqrt".into(), |x| x.sqrt())),
88 ("ceil", Function::token_from_fn("ceil".into(), |x| x.ceil())), 88 ("ceil", Function::token_from_fn("ceil".into(), |x| x.ceil())),
89 ("floor", Function::token_from_fn("floor".into(), |x| x.floor())), 89 ("floor", Function::token_from_fn("floor".into(), |x| x.floor())),
90 ("rad", Function::token_from_fn("rad".into(), |x| x.to_radians())),
91 ("deg", Function::token_from_fn("deg".into(), |x| x.to_degrees())),
92 ("abs", Function::token_from_fn("abs".into(), |x| x.abs())),
90 // single arg functions can be added here 93 // single arg functions can be added here
91 ].iter().cloned().collect(); 94 ].iter().cloned().collect();
92} 95}