Here you can find the source of angle360Limit(float angle)
public static float angle360Limit(float angle)
//package com.java2s; //License from project: Apache License public class Main { public static float angle360Limit(float angle) { while (angle >= 360f) angle -= 360f;/*from w ww. j av a 2s . c o m*/ while (angle < 0) angle += 360f; return angle; } }