aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/cc/polyfrost/oneconfig/utils
diff options
context:
space:
mode:
authorDeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com>2022-06-02 19:14:51 +0200
committerDeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com>2022-06-02 19:14:51 +0200
commit0ad0457dc608ade2cd8ff7e325c009c2847fb711 (patch)
treea8761d2aef3684de9c10c5345f7e11a3cde245da /src/main/java/cc/polyfrost/oneconfig/utils
parent4945b1bf585a0a53917917b29f3450002d4e3553 (diff)
downloadOneConfig-0ad0457dc608ade2cd8ff7e325c009c2847fb711.tar.gz
OneConfig-0ad0457dc608ade2cd8ff7e325c009c2847fb711.tar.bz2
OneConfig-0ad0457dc608ade2cd8ff7e325c009c2847fb711.zip
animations
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/utils')
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/utils/MathUtils.java13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/utils/MathUtils.java b/src/main/java/cc/polyfrost/oneconfig/utils/MathUtils.java
index c4beb82..630390b 100644
--- a/src/main/java/cc/polyfrost/oneconfig/utils/MathUtils.java
+++ b/src/main/java/cc/polyfrost/oneconfig/utils/MathUtils.java
@@ -11,6 +11,7 @@ public final class MathUtils {
return number < min ? min : Math.min(number, max);
}
+ @Deprecated
public static float easeOut(float current, float goal, float speed) {
float deltaTime = OneConfigGui.INSTANCE == null ? 16 : OneConfigGui.INSTANCE.getDeltaTime();
if (Math.round(Math.abs(goal - current) * 100) > 0) {
@@ -20,18 +21,6 @@ public final class MathUtils {
}
}
- public static float easeInQuad(float current) {
- return current * current;
- }
-
- /**
- * Adapted from <a href="https://github.com/jesusgollonet/processing-penner-easing">https://github.com/jesusgollonet/processing-penner-easing</a>
- */
- public static float easeInOutCirc(float time, float beginning, float change, float duration) {
- if ((time /= duration / 2) < 1) return -change / 2 * ((float) Math.sqrt(1 - time * time) - 1) + beginning;
- return change / 2 * ((float) Math.sqrt(1 - (time -= 2) * time) + 1) + beginning;
- }
-
public static float map(float value, float start1, float stop1, float start2, float stop2) {
return start2 + (stop2 - start2) * ((value - start1) / (stop1 - start1));
}