zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 5125788e331c146ef5f5f33be775e3538353a0b6 (tree)
parent ac2333ee63b3c0af8a075d325e2313c9b255a46e
Author: alichraghi <chraghiali1@gmail.com>
Date:   Mon,  4 Oct 2021 21:50:08 +0330

add phi constant

Diffstat:
Mlib/std/math.zig | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/lib/std/math.zig b/lib/std/math.zig @@ -9,6 +9,9 @@ pub const e = 2.71828182845904523536028747135266249775724709369995; /// Archimedes' constant (π) pub const pi = 3.14159265358979323846264338327950288419716939937510; +/// Phi or Golden ratio constant (Φ) = (1 + sqrt(5))/2 +pub const phi = 1.6180339887498948482045868343656381177203091798057628621; + /// Circle constant (τ) pub const tau = 2 * pi;