rekka / meval-rs

Math expression parser and evaluation library for Rust
The Unlicense
153 stars 30 forks source link

Tau Constant Support #23

Closed JosephTLyons closed 3 years ago

JosephTLyons commented 4 years ago

According to the documentation:

https://doc.rust-lang.org/nightly/std/f64/consts/constant.TAU.html

The Tau constant will be stabilized in Rust 1.47. Could Tau be supported in meval-rs once this has landed in Rust stable?

rekka commented 3 years ago

Hey, I'm sorry for not replying for more than a year. I was ignoring this repo a bit...

I am not planning to add more constants in the default Context since the intended way to add them is by creating a custom Context. I see that this was used in nushell here: https://github.com/nushell/nushell/blob/8ac572ed279d20abed8883e2dfbf9f2907ca62af/crates/nu-command/src/commands/math/eval.rs#L98