change Angle To Single - Android java.lang

Android examples for java.lang:Math Trigonometric Function

Description

change Angle To Single

Demo Code


//package com.java2s;

public class Main {

    public static float changeAngleToSingle(float angle) {
        while (angle >= 360) {
            angle -= 360;//from  w  w  w.ja v a2  s  .  com
        }
        while (angle < 0) {
            angle += 360;
        }
        return angle;
    }
}

Related Tutorials