mirror of
https://github.com/darksaid98/Flashback.git
synced 2026-12-01 14:38:50 +00:00
0.11.0
This commit is contained in:
1 parent
63535e6b3d
commit
aadd309397
20 files changed
+228
-101
No files matched your search
@@ -7,7 +7,7 @@ import org.joml.Vector3d;
|
||||
|
||||
public class Interpolation {
|
||||
|
||||
public static double linear(double from, double to, float amount) {
|
||||
public static double linear(double from, double to, double amount) {
|
||||
return from + (to - from) * amount;
|
||||
}
|
||||
|
||||
@@ -15,10 +15,14 @@ public class Interpolation {
|
||||
return from + (to - from) * amount;
|
||||
}
|
||||
|
||||
|
||||
public static float linearAngle(float from, float to, float amount) {
|
||||
float delta = Mth.wrapDegrees(to - from);
|
||||
return from + Math.max(-180, Math.min(180, delta * amount));
|
||||
}
|
||||
|
||||
public static double linearAngle(double from, double to, double amount) {
|
||||
double delta = Mth.wrapDegrees(to - from);
|
||||
return from + Math.max(-180, Math.min(180, delta * amount));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user