Java interpolate interpolateRotation(float par1, float par2, float par3)

Here you can find the source of interpolateRotation(float par1, float par2, float par3)

Description

interpolate Rotation

License

Open Source License

Declaration

public static float interpolateRotation(float par1, float par2,
            float par3) 

Method Source Code

//package com.java2s;
//License from project: GNU General Public License 

public class Main {
    public static float interpolateRotation(float par1, float par2,
            float par3) {
        float f3;

        for (f3 = par2 - par1; f3 < -180.0F; f3 += 360.0F) {
            ;// w w w. ja  v a 2 s  .  com
        }

        while (f3 >= 180.0F) {
            f3 -= 360.0F;
        }

        return par1 + par3 * f3;
    }
}

Related

  1. interpolateFloat(float f0, float f1, double mixer)
  2. interpolateFloat(float t, float a, float b)
  3. interpolateLinear(final float a, final float b, final float t)
  4. interpolateLinear(float lastState, float currentState, float ip)
  5. interpolateProp(final String source, final String propName, final String defValue)
  6. interpolateRotation(float prevRotation, float nextRotation, float partialTick)
  7. interpolateRound(double a, double b, double t)
  8. interpolateSmoothly(final float position, final float startPosition, final float endPosition, final float startValue, final float endValue)
  9. interpolateValue(double current, double prev, float partialTickTime)