Android examples for java.lang:Math Geometry
Normalize the angle to the range 0 <= value < 360.
// Licensed under the Apache License, Version 2.0 (the "License"); //package com.java2s; public class Main { /**// ww w. j av a 2s . c om * Normalize the angle to the range 0 <= value < 360. */ public static double normalizeAngle(double angle) { double remainder = angle % 360; if (remainder < 0) remainder += 360; return remainder; } }