List of utility methods to do interpolate
double | interpolateValue(double current, double prev, float partialTickTime) interpolate Value return prev + partialTickTime * (current - prev);
|
float | interpolateValues(float prevVal, float nextVal, float partialTick) interpolate Values return prevVal + partialTick * (nextVal - prevVal);
|
float | interpolateYawDegrees(float angle1, float ratio1, float angle2, float ratio2) interpolate Yaw Degrees if (Math.abs(angle1 - angle2) > 180) { if (angle2 > angle1) { angle2 -= 360; } else { angle1 -= 360; return angle1 * ratio1 + angle2 * ratio2; ... |
double | interpolateYFromX(double x, double x0, double x1, double y0, double y1) interpolate Y From X if (x < x0 || x > x1) { throw new IllegalArgumentException("can't extrapolate"); if (x0 == x1) { return y0; double dy = y1 - y0; double dx = x1 - x0; ... |