Java Utililty Methods Angle Reduce

List of utility methods to do Angle Reduce

Description

The list of methods to do Angle Reduce are organized into topic(s).

Method

doublereduceAngle(double theta)
reduce Angle
theta %= TWOPI;
if (Math.abs(theta) > PI) {
    theta = theta - TWOPI;
if (Math.abs(theta) > HALF_PI) {
    theta = PI - theta;
return theta;
...
doublereduceAngle(double theta)
reduce Angle
theta %= TWO_PI;
if (Math.abs(theta) > PI) {
    theta = theta - TWO_PI;
if (Math.abs(theta) > HALF_PI) {
    theta = PI - theta;
return theta;
...
floatreduceAngle(float angle)
Reduces the given angle to its equivalent angle between -pi and pi.
return loop(angle, -PI, PI);
floatreduceAngle(float theta)
Reduces the given angle into the -PI/4 ...
theta %= TWO_PI;
if (abs(theta) > PI) {
    theta = theta - TWO_PI;
if (abs(theta) > HALF_PI) {
    theta = PI - theta;
return theta;
...