diff --git a/LeoCorpLibrary/Maths.cs b/LeoCorpLibrary/Maths.cs index 9f99f83..a3c4310 100644 --- a/LeoCorpLibrary/Maths.cs +++ b/LeoCorpLibrary/Maths.cs @@ -124,6 +124,8 @@ public static double DegreesToRadians(double degrees) /// A value, the positive of the number. public static double GetPositive(double n) => n >= 0 ? n : -n; + public static double GetNegative(double n) => n <= 0 ? n : -n; + /// /// Returns the factorial of a specified number.