Here you can find the source of interpolateRotation(float prevRotation, float nextRotation, float partialTick)
public static float interpolateRotation(float prevRotation, float nextRotation, float partialTick)
//package com.java2s; /******************************************************************************* * HellFirePvP / Astral Sorcery 2017//from w w w . j a va 2s . c o m * * This project is licensed under GNU GENERAL PUBLIC LICENSE Version 3. * The source code is available on github: https://github.com/HellFirePvP/AstralSorcery * For further details, see the License file there. ******************************************************************************/ public class Main { public static float interpolateRotation(float prevRotation, float nextRotation, float partialTick) { float rot = nextRotation - prevRotation; while (rot >= 180.0F) { rot -= 360.0F; } while (rot >= 180.0F) { rot -= 360.0F; } return prevRotation + partialTick * rot; } }