Skip to content

Commit 5125788

Browse files
alichraghiandrewrk
authored andcommitted
add phi constant
1 parent ac2333e commit 5125788

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/std/math.zig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ pub const e = 2.71828182845904523536028747135266249775724709369995;
99
/// Archimedes' constant (π)
1010
pub const pi = 3.14159265358979323846264338327950288419716939937510;
1111

12+
/// Phi or Golden ratio constant (Φ) = (1 + sqrt(5))/2
13+
pub const phi = 1.6180339887498948482045868343656381177203091798057628621;
14+
1215
/// Circle constant (τ)
1316
pub const tau = 2 * pi;
1417

0 commit comments

Comments
 (0)