diff options
| author | Matt Fellenz <matt@felle.nz> | 2023-08-30 02:56:00 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-30 11:56:00 +0200 |
| commit | 35c785ea118d13112c771e4c00e6f9a21dd6ba65 (patch) | |
| tree | 400d1bb8cc831a330c0b4adfa831a76fd2b975e3 | |
| parent | 0e5c48ad0d04c22831e3b41c2904a24c7f5171cb (diff) | |
Add tau (#2033)
| -rw-r--r-- | crates/typst-library/src/compute/calc.rs | 1 | ||||
| -rw-r--r-- | docs/reference/details.yml | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/crates/typst-library/src/compute/calc.rs b/crates/typst-library/src/compute/calc.rs index ee4261af..7cfe2491 100644 --- a/crates/typst-library/src/compute/calc.rs +++ b/crates/typst-library/src/compute/calc.rs @@ -47,6 +47,7 @@ pub fn module() -> Module { scope.define("inf", f64::INFINITY); scope.define("nan", f64::NAN); scope.define("pi", std::f64::consts::PI); + scope.define("tau", std::f64::consts::TAU); scope.define("e", std::f64::consts::E); Module::new("calc").with_scope(scope) } diff --git a/docs/reference/details.yml b/docs/reference/details.yml index 8e9af3a0..5b6b9ed0 100644 --- a/docs/reference/details.yml +++ b/docs/reference/details.yml @@ -151,7 +151,7 @@ calculate: | These functions are part of the `calc` module and not imported by default. In addition to the functions listed below, the `calc` module also defines the - constants `pi`, `e`, `inf`, and `nan`. + constants `pi`, `tau`, `e`, `inf`, and `nan`. construct: | Construction of and conversions between values of different types. |
