diff --git a/Engine.Core/Math.cs b/Engine.Core/Math.cs index cfa52d2..2e20485 100644 --- a/Engine.Core/Math.cs +++ b/Engine.Core/Math.cs @@ -30,6 +30,13 @@ public static class Math /// public const float DegreeToRadian = PI / 180f; + /// + /// Gets one minus of given . + /// + /// The value . + /// One minus of given . + public static T OneMinus(T value) where T : INumber => T.One - value; + /// /// Adds two s. /// diff --git a/Engine.Core/MathExtensions.cs b/Engine.Core/MathExtensions.cs index 55bcdcc..7b6725d 100644 --- a/Engine.Core/MathExtensions.cs +++ b/Engine.Core/MathExtensions.cs @@ -5,6 +5,9 @@ namespace Syntriax.Engine.Core; public static class MathExtensions { + /// + public static T OneMinus(this T value) where T : INumber => Math.OneMinus(value); + /// public static T Add(this T left, T value) where T : INumber => Math.Add(left, value);