constrain Angle - Android java.lang

Android examples for java.lang:Math Trigonometric Function

Description

constrain Angle

Demo Code


//package com.java2s;

public class Main {
    public static double constrainAngle(double x) {
        x = Math.IEEEremainder(x, 360);
        if (x < 0)
            x += 360;//from ww w . ja va 2  s .  co m
        return x;
    }
}

Related Tutorials