diff --git a/LeoCorpLibrary/Maths.cs b/LeoCorpLibrary/Maths.cs index 8643c58..3c62191 100644 --- a/LeoCorpLibrary/Maths.cs +++ b/LeoCorpLibrary/Maths.cs @@ -117,6 +117,8 @@ public static double DegreesToRadians(double degrees) /// If 10 is specified, the method will return -10. public static double GetOpposite(double n) => 0 - n; + public static double GetPositive(double n) => n >= 0 ? n : -n; + /// /// Returns the factorial of a specified number.