This commit is contained in:
Moulberry committed 2024-07-25 16:40:29 +08:00
1 parent 9c4a30d224
commit 666398e480
174 files changed
+8694 -2942

No files matched your search

@@ -0,0 +1,19 @@
package com.moulberry.flashback;
import org.joml.Quaternionf;
public class Interpolation {
public static double linear(double from, double to, float amount) {
return from + (to - from) * amount;
}
public static float linear(float from, float to, float amount) {
return from + (to - from) * amount;
}
public static Quaternionf linear(Quaternionf from, Quaternionf to, float amount) {
return from.slerp(to, amount, new Quaternionf());
}
}