From a18e994ae5fc95761d4d3569a99d98dd4a99660b Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sun, 26 Dec 2021 16:01:25 +0100 Subject: Add `round()` function --- src/lex.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lex.rs b/src/lex.rs index da542d5..1220a1f 100644 --- a/src/lex.rs +++ b/src/lex.rs @@ -103,6 +103,7 @@ lazy_static! { m.insert("acot", Function::token_from_fn("acot".into(), |x| (1./x).atan())); m.insert("exp", Function::token_from_fn("exp".into(), |x| x.exp())); m.insert("exp2", Function::token_from_fn("exp2".into(), |x| x.exp2())); + m.insert("round", Function::token_from_fn("round".into(), |x| x.round())); // single arg function s can be added here m }; -- cgit v1.2.3