Here you can find the source of interpolateRotation(float par1, float par2, float par3)
public static float interpolateRotation(float par1, float par2, float par3)
//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; } }