public static float normalize(final float angle) {
        final float mod = angle % 360;
        final float result = mod >= 0 ? mod : (mod + 360) % 360;
        // normalize -0 and +0 both to the positive side
        if (result == 0f) {
            return 0f;
        }
        return result;
    }
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
main/src/main/java/cgeo/geocaching/utils/AngleUtils.java