Is there a defined value in the standard namespaces for the golden ratio?
c#
Solution
No there is not. However, the golden ratio is the solution to a number whose reciprocal is itself minus 1:
You can then solve that with the quadratic formula to get:
This means you can define the golden ratio as one of the following:
readonly double GoldenRatio = (1 + Math.Sqrt(5)) / 2;
const double GoldenRatio = 1.61803398874989484820458683436;
Problem
I was trying to find if there is a value for the golden ratio already defined in one of the standard namespaces but I was not able to find anything in the docs or other online resources. So is there a value for the golden ratio already defined somewhere in the standard namespaces that I might have missed? Under `Math` there is `Math.Pi` and `Math.E` but no `Math.Phi`?