Android examples for java.lang:Math Trigonometric Function
Normalize degree angle
//package com.java2s; public class Main { /**//from w ww . j av a 2 s .co m * Normalize angle * * @param angle * //TODO describe it * @return //TODO describe it */ public static float normalizeAngle(float angle) { angle %= 360; if (angle < -180) { angle += 360; } if (angle > 180) { angle -= 360; } return angle; } }