Here you can find the source of normalize(final float angle)
Parameter | Description |
---|---|
angle | the angle in degrees |
public static float normalize(final float angle)
//package com.java2s; //License from project: Apache License public class Main { /**//w ww . j a v a 2s .co m * Normalize an angle so that it belongs to the [0, 360[ range. * @param angle the angle in degrees * @return the same angle in the [0, 360[ range */ public static float normalize(final float angle) { return (angle >= 0 ? angle : (360 - ((-angle) % 360))) % 360; } }