Java Utililty Methods Radian Calculation

List of utility methods to do Radian Calculation

Description

The list of methods to do Radian Calculation are organized into topic(s).

Method

doubleradian2Angle(double radian)
radian Angle
return radian / Math.PI * 180;
doubleradianAdd(double a, double b)
Adding to radians for Motion library.
double result = 0;
result = a + b;
if (result < -1 * Math.PI) {
    result %= Math.PI;
    result += Math.PI;
} else if (result > Math.PI) {
    result %= Math.PI;
    result += (-1 * Math.PI);
...
doubleradiancheck(double x)
Returns an angle between 0 and 2 pi
x = Modulo(x, TWOPI);
if (x < 0.0)
    x = x + TWOPI;
return x;
doubleradians(double d)
radians
return d * Math.PI / 180.0;
doubleradians(double w)
radians
long iw = (long) Math.floor(w);
return (Math.abs(iw % 360) * Math.PI / 180.0);
byteradiansToBrads(double angleRadians)
Converts angle in radians to angle in binary radians
return (byte) Math.round(angleRadians * 128 / Math.PI);
StringradiansToRA(final double raRadians)
Obtain the String RA of the given Radians.
return degreesToRA((raRadians * 180) / Math.PI);