I\'m working on a simple rotate routine which normalizes an objects rotation between 0 and 360 degrees. My C# code seems to be working but I\'m not entirely happy with it. Can a
Function that comes handy when normalizing angles (degrees) into interval [0, 360> :
float normalize_angle(float angle) { float k = angle; while(k < 0.0) k += 360.0; while(k >= 360.0) k -= 360.0; return k; }