Java Utililty Methods interpolate

List of utility methods to do interpolate

Description

The list of methods to do interpolate are organized into topic(s).

Method

doubleinterpolateValue(double current, double prev, float partialTickTime)
interpolate Value
return prev + partialTickTime * (current - prev);
floatinterpolateValues(float prevVal, float nextVal, float partialTick)
interpolate Values
return prevVal + partialTick * (nextVal - prevVal);
floatinterpolateYawDegrees(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;
...
doubleinterpolateYFromX(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;
...