mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 04:45:04 +02:00
Add Tau constant (#2673)
Adds Tau constant using meval::Context. Also adds a test to match pi's. Note: Tau ends up not being more precise than 2*pi. Resolves: #2258
This commit is contained in:
@ -71,3 +71,15 @@ fn evaluates_pi() {
|
||||
|
||||
assert!(actual.out.contains("3.14"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn evaluates_tau() {
|
||||
let actual = nu!(
|
||||
cwd: ".", pipeline(
|
||||
r#"
|
||||
math eval tau
|
||||
"#
|
||||
));
|
||||
|
||||
assert!(actual.out.contains("6.28"));
|
||||
}
|
||||
|
Reference in New Issue
Block a user