diff --git a/Engine.Core/Math.cs b/Engine.Core/Math.cs index 07b7c24..48b11e2 100644 --- a/Engine.Core/Math.cs +++ b/Engine.Core/Math.cs @@ -38,6 +38,20 @@ public static class Math /// The absolute value of . public static T Abs(T x) where T : INumber => x > T.Zero ? x : -x; + /// + /// Returns the cosine of a number. + /// + /// The number. + /// The cosine of . + public static float Cos(float x) => MathF.Cos(x); + + /// + /// Returns the sine of a number. + /// + /// The number. + /// The sine of . + public static float Sin(float x) => MathF.Sin(x); + /// /// Returns the arccosine of a number. /// diff --git a/Engine.Core/MathExtensions.cs b/Engine.Core/MathExtensions.cs index 9fba5b8..5232fbc 100644 --- a/Engine.Core/MathExtensions.cs +++ b/Engine.Core/MathExtensions.cs @@ -8,6 +8,12 @@ public static class MathExtensions /// public static T Abs(this T x) where T : INumber => Math.Abs(x); + /// + public static float Cos(this float x) => Math.Cos(x); + + /// + public static float Sin(this float x) => Math.Sin(x); + /// public static float Acos(this float x) => Math.Acos(x);