Java Utililty Methods Angle Reduce

List of utility methods to do Angle Reduce

  1. HOME
  2. Java
  3. A
  4. Angle Reduce

Description

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

Method

double reduceAngle(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;
...
double reduceAngle(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;
...
float reduceAngle(float angle)
Reduces the given angle to its equivalent angle between -pi and pi.
return loop(angle, -PI, PI);
float reduceAngle(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;
...

AltStyle によって変換されたページ (->オリジナル) /