public final class PlaneAngleRadians extends Object
double
values are assumed to be in
radians.PlaneAngle
Modifier and Type | Field and Description |
---|---|
static double |
PI
Value of \( \pi \): 3.141592653589793.
|
static double |
PI_OVER_TWO
Value of \( \pi/2 \): 1.5707963267948966.
|
static double |
THREE_PI_OVER_TWO
Value of \( 3\pi/2 \): 4.71238898038469.
|
static double |
TWO_PI
Value of \( 2\pi \): 6.283185307179586.
|
Modifier and Type | Method and Description |
---|---|
static double |
normalize(double angle,
double center)
Normalize an angle in an interval of size 2π around a
center value.
|
static double |
normalizeBetweenMinusPiAndPi(double angle)
Normalize an angle to be in the range [-π, π).
|
static double |
normalizeBetweenZeroAndTwoPi(double angle)
Normalize an angle to be in the range [0, 2π).
|
public static final double PI
public static final double TWO_PI
public static final double PI_OVER_TWO
public static final double THREE_PI_OVER_TWO
public static double normalize(double angle, double center)
angle
- Value to be normalized.center
- Center of the desired interval for the result.a - 2 * k
with integer k
such that
center - pi <= a - 2 * k * pi < center + pi
.public static double normalizeBetweenMinusPiAndPi(double angle)
angle
- Value to be normalized.a - 2 * k
with integer k
such that
-pi <= a - 2 * k * pi < pi
.public static double normalizeBetweenZeroAndTwoPi(double angle)
angle
- Value to be normalized.a - 2 * k
with integer k
such that
0 <= a - 2 * k * pi < 2 * pi
.Copyright © 2017–2020 The Apache Software Foundation. All rights reserved.