aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/thatgravyboat/skyblockhud/Utils.java
diff options
context:
space:
mode:
authorThatGravyBoat <thatgravyboat@gmail.com>2021-07-07 21:52:37 -0230
committerThatGravyBoat <thatgravyboat@gmail.com>2021-07-07 21:52:37 -0230
commit36a66e436ef3c5a3aa2deda0e1538db072ca7f71 (patch)
tree32a3a104464da3ef8ee743ecfe241d1320ad25c9 /src/main/java/com/thatgravyboat/skyblockhud/Utils.java
parent93248d28d6b314b42f6b0d82164975343b214ece (diff)
downloadSkyblockHud-Death-Defied-36a66e436ef3c5a3aa2deda0e1538db072ca7f71.tar.gz
SkyblockHud-Death-Defied-36a66e436ef3c5a3aa2deda0e1538db072ca7f71.tar.bz2
SkyblockHud-Death-Defied-36a66e436ef3c5a3aa2deda0e1538db072ca7f71.zip
Added Alpha Crystal Hollows locations to get ahead of the update and added commands for people to help me with deving.
Diffstat (limited to 'src/main/java/com/thatgravyboat/skyblockhud/Utils.java')
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/Utils.java21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/Utils.java b/src/main/java/com/thatgravyboat/skyblockhud/Utils.java
index a7621ef..8598e1f 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/Utils.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/Utils.java
@@ -1,9 +1,5 @@
package com.thatgravyboat.skyblockhud;
-import java.nio.FloatBuffer;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.LinkedList;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.client.gui.FontRenderer;
@@ -20,6 +16,11 @@ import org.lwjgl.BufferUtils;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL14;
+import java.nio.FloatBuffer;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.LinkedList;
+
public class Utils {
private static LinkedList<Integer> guiScales = new LinkedList<>();
@@ -47,6 +48,18 @@ public class Utils {
return value <= max && value >= min;
}
+ public static float lerp(float f, float g, float h) {
+ return g + f * (h - g);
+ }
+
+ public static double lerp(double d, double e, double f) {
+ return e + d * (f - e);
+ }
+
+ public static int lerp(float f, int g, int h) {
+ return (int) (g + f * (h - g));
+ }
+
public static int whatRomanNumeral(String roman) {
switch (roman.toLowerCase()) {
case "i":