diff options
| author | dbandstra <dbandstra@protonmail.com> | 2019-11-18 21:46:14 -0800 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-11-19 06:20:20 +0000 |
| commit | b3539b40a6fc98978b820a74c348b6272bfbc027 (patch) | |
| tree | 05b484ac549015bd72e34954c8077db30f33e322 /lib/std/math.zig | |
| parent | aa4e92f3b3dc4b349eeabf589f8b9047e7342f03 (diff) | |
| download | zig-b3539b40a6fc98978b820a74c348b6272bfbc027.tar.gz zig-b3539b40a6fc98978b820a74c348b6272bfbc027.zip | |
add `std.math.tau` constant (equivalent to 2 * pi)
Diffstat (limited to 'lib/std/math.zig')
| -rw-r--r-- | lib/std/math.zig | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/std/math.zig b/lib/std/math.zig index 8e08cacc42..714521357c 100644 --- a/lib/std/math.zig +++ b/lib/std/math.zig @@ -10,6 +10,9 @@ pub const e = 2.71828182845904523536028747135266249775724709369995; /// Archimedes' constant (π) pub const pi = 3.14159265358979323846264338327950288419716939937510; +/// Circle constant (τ) +pub const tau = 2 * pi; + /// log2(e) pub const log2e = 1.442695040888963407359924681001892137; |
