diff --git a/com/Acrobot/Breeze/Utils/NumberUtil.java b/com/Acrobot/Breeze/Utils/NumberUtil.java index 4a3f6f1..94b3f26 100644 --- a/com/Acrobot/Breeze/Utils/NumberUtil.java +++ b/com/Acrobot/Breeze/Utils/NumberUtil.java @@ -65,7 +65,7 @@ public class NumberUtil { } /** - * Rounds the number up to two digit points (Can be inaccurate due to using decimal-points) + * Rounds the number up to two decimal points (Can be inaccurate due to using decimal-points) * * @param number Number to round * @return Rounded number @@ -73,6 +73,15 @@ public class NumberUtil { public static double roundUp(double number) { return Math.ceil(number * 100) / 100; } + /** + * Rounds the number down to two decimal points + * + * @param number Number to round + * @return Rounded number + */ + public static double roundDown(double number) { + return Math.floor(number * 100) / 100; + } /** * Converts the number (in seconds) to timer-like format, like 2:00 (minutes:seconds)