Java interpolate interpolateYawDegrees(float angle1, float ratio1, float angle2, float ratio2)

Here you can find the source of interpolateYawDegrees(float angle1, float ratio1, float angle2, float ratio2)

Description

interpolate Yaw Degrees

License

Open Source License

Declaration

public static float interpolateYawDegrees(float angle1, float ratio1, float angle2, float ratio2) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static float interpolateYawDegrees(float angle1, float ratio1, float angle2, float ratio2) {
        if (Math.abs(angle1 - angle2) > 180) {
            if (angle2 > angle1) {
                angle2 -= 360;/*w  w  w  .j  ava  2s.c om*/
            } else {
                angle1 -= 360;
            }
        }
        return angle1 * ratio1 + angle2 * ratio2;
    }
}

Related

  1. interpolateRotation(float prevRotation, float nextRotation, float partialTick)
  2. interpolateRound(double a, double b, double t)
  3. interpolateSmoothly(final float position, final float startPosition, final float endPosition, final float startValue, final float endValue)
  4. interpolateValue(double current, double prev, float partialTickTime)
  5. interpolateValues(float prevVal, float nextVal, float partialTick)
  6. interpolateYFromX(double x, double x0, double x1, double y0, double y1)