public class NormalizeAngle { public Integer normalizeValueUsingModulo(Integer angle){ int angleRemainder = angle % 360; int normalizedAngle = angleRemainder > 0 ? angleRemainder : 360 + angleRemainder; return normalizedAngle; } public Integer normalizeValueUsingFloorMod(Integer angle){ int angleRemainder = Math.floorMod(angle, 360); int normalizedAngle = angleRemainder > 0 ? angleRemainder : 360 + angleRemainder; return normalizedAngle; } public static void main(String[] args){ } }