From a0ff501947a84b268e099524a06b56a6b900dad2 Mon Sep 17 00:00:00 2001 From: DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> Date: Tue, 3 May 2022 18:25:32 +0200 Subject: move to cc.polyfrost --- .../io/polyfrost/oneconfig/utils/MathUtils.java | 30 ---------------------- 1 file changed, 30 deletions(-) delete mode 100644 src/main/java/io/polyfrost/oneconfig/utils/MathUtils.java (limited to 'src/main/java/io/polyfrost/oneconfig/utils/MathUtils.java') diff --git a/src/main/java/io/polyfrost/oneconfig/utils/MathUtils.java b/src/main/java/io/polyfrost/oneconfig/utils/MathUtils.java deleted file mode 100644 index 1e4857f..0000000 --- a/src/main/java/io/polyfrost/oneconfig/utils/MathUtils.java +++ /dev/null @@ -1,30 +0,0 @@ -package io.polyfrost.oneconfig.utils; - -public class MathUtils { - public static float clamp(float number) { - return number < (float) 0.0 ? (float) 0.0 : Math.min(number, (float) 1.0); - } - - public static float easeOut(float current, float goal, float speed) { - if (Math.floor(Math.abs(goal - current) / (float) 0.01) > 0) { - return current + (goal - current) / speed; - } else { - return goal; - } - } - - - public static float easeInQuad(float current) { - return current * current; - } - - /** - * taken from https://github.com/jesusgollonet/processing-penner-easing - */ - public static float easeInOutCirc(float t, float b, float c, float d) { - if ((t /= d / 2) < 1) return -c / 2 * ((float) Math.sqrt(1 - t * t) - 1) + b; - return c / 2 * ((float) Math.sqrt(1 - (t -= 2) * t) + 1) + b; - } - - -} -- cgit