Some opts

This commit is contained in:
Zoë Gidiere
2023-10-07 17:59:29 -06:00
parent 2f1b8690ff
commit 29e5b9f3ff
5 changed files with 42 additions and 35 deletions

View File

@@ -251,4 +251,12 @@ public final class MathUtil {
public static double interpQuintic(double t) {
return t * t * t * (t * (t * 6 - 15) + 10);
}
public static double linearMap(double x, double x1, double y1, double x2, double y2) {
return (((y1-y2)*(x-x1))/(x1-x2))+y1;
}
public static double hypot(double x, double y) {
return Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2));
}
}