aboutsummaryrefslogtreecommitdiff
path: root/lib/std
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-11-29 10:44:55 -0500
committerAndrew Kelley <andrew@ziglang.org>2019-11-29 10:48:46 -0500
commit2ab7f31e99defc62353c3dfed0f6f427c9ac8e80 (patch)
tree202109b1fc2959021d0e5db180a07eecc134e9bc /lib/std
parenta6c9c5f767217ba3591e51047736f0fa6a975a57 (diff)
downloadzig-2ab7f31e99defc62353c3dfed0f6f427c9ac8e80.tar.gz
zig-2ab7f31e99defc62353c3dfed0f6f427c9ac8e80.zip
std.math: remove constants that should be expressions
All four of these can be represented in fewer characters with expressions, which will be guaranteed to happen at compile-time, and have the same or better precision. The other math constants here which depend on function calls could be similarly removed if and when #425 is solved. However I left them for now since Zig does not eagerly evaluate functions with comptime parameters.
Diffstat (limited to 'lib/std')
-rw-r--r--lib/std/math.zig12
1 files changed, 0 insertions, 12 deletions
diff --git a/lib/std/math.zig b/lib/std/math.zig
index 714521357c..f87996f174 100644
--- a/lib/std/math.zig
+++ b/lib/std/math.zig
@@ -25,18 +25,6 @@ pub const ln2 = 0.693147180559945309417232121458176568;
/// ln(10)
pub const ln10 = 2.302585092994045684017991454684364208;
-/// π/2
-pub const pi_2 = 1.570796326794896619231321691639751442;
-
-/// π/4
-pub const pi_4 = 0.785398163397448309615660845819875721;
-
-/// 1/π
-pub const one_pi = 0.318309886183790671537767526745028724;
-
-/// 2/π
-pub const two_pi = 0.636619772367581343075535053490057448;
-
/// 2/sqrt(π)
pub const two_sqrtpi = 1.128379167095512573896158903121545172;