From 0d0340e11adaa39aea34083e7ff535474d905f96 Mon Sep 17 00:00:00 2001 From: "W2.Wizard" Date: Fri, 8 Jan 2021 12:06:17 +0100 Subject: [PATCH 1/2] Added golden ratio value --- Source/Engine/Core/Math/Mathf.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/Engine/Core/Math/Mathf.cs b/Source/Engine/Core/Math/Mathf.cs index 7286573bf..8240b02cc 100644 --- a/Source/Engine/Core/Math/Mathf.cs +++ b/Source/Engine/Core/Math/Mathf.cs @@ -36,6 +36,11 @@ namespace FlaxEngine /// public const float PiOverFour = (float)(Math.PI / 4); + /// + /// A value specifying the golden mean + /// + public const float GoldenRatio = 1.61803f; + /// /// Returns the absolute value of f. /// From 2d2d45f56848ed34c75cb2d2eae76241cb4e5b41 Mon Sep 17 00:00:00 2001 From: "W2.Wizard" Date: Fri, 8 Jan 2021 23:14:09 +0100 Subject: [PATCH 2/2] Increased precision by 5 digits --- Source/Engine/Core/Math/Mathf.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Engine/Core/Math/Mathf.cs b/Source/Engine/Core/Math/Mathf.cs index 8240b02cc..529bd6ab0 100644 --- a/Source/Engine/Core/Math/Mathf.cs +++ b/Source/Engine/Core/Math/Mathf.cs @@ -39,7 +39,7 @@ namespace FlaxEngine /// /// A value specifying the golden mean /// - public const float GoldenRatio = 1.61803f; + public const float GoldenRatio = 1.6180339887f; /// /// Returns the absolute value of f.