feat: added Math.OneMinus method

This commit is contained in:
2025-05-03 22:16:14 +03:00
parent 4bfe98852c
commit 1366a417f1
2 changed files with 10 additions and 0 deletions

View File

@@ -30,6 +30,13 @@ public static class Math
/// </summary>
public const float DegreeToRadian = PI / 180f;
/// <summary>
/// Gets one minus of given <see cref="T"/>.
/// </summary>
/// <param name="value">The value <see cref="T"/>.</param>
/// <returns>One minus of given <see cref="T"/>.</returns>
public static T OneMinus<T>(T value) where T : INumber<T> => T.One - value;
/// <summary>
/// Adds two <see cref="T"/>s.
/// </summary>