From 77e1949f59c4515f6aea66de525d02f056569f69 Mon Sep 17 00:00:00 2001 From: Syntriax Date: Wed, 24 Jan 2024 12:28:01 +0300 Subject: [PATCH] refactor: Math Constants Now Use Each Other as References --- Engine.Core/Math.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Engine.Core/Math.cs b/Engine.Core/Math.cs index 6e1ebea..ea6ba8d 100644 --- a/Engine.Core/Math.cs +++ b/Engine.Core/Math.cs @@ -4,12 +4,12 @@ namespace Syntriax.Engine.Core; public static class Math { - public const float RadianToDegree = 57.29577866666166f; - public const float DegreeToRadian = 0.01745329277777778f; + public const float RadianToDegree = 180f / PI; + public const float DegreeToRadian = PI / 180f; public const float E = 2.718281828459045f; public const float PI = 3.1415926535897932f; - public const float Tau = 6.283185307179586f; + public const float Tau = 2f * PI; public static float Abs(float x) => MathF.Abs(x); public static float Acos(float x) => MathF.Acos(x);