public class Angle
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static Angle |
ANGLE_180
Constant for -180 degrees angle
|
static Angle |
ANGLE_90
Constant for +90 degrees angle
|
static Angle |
ZERO
Constant for 0 angle
|
Modifier and Type | Method and Description |
---|---|
Angle |
add(Angle other)
Adds another angleobject to this angle
|
Angle |
add(double value)
Adds a constant to this angle
|
org.apache.commons.math3.geometry.euclidean.threed.Vector3D |
applyInverseTo(double x,
double y)
Rotates a given position inversely by this angle (2D rotation around the
z-axis).
|
org.apache.commons.math3.geometry.euclidean.threed.Vector3D |
applyInverseTo(org.apache.commons.math3.geometry.euclidean.threed.Vector3D position)
Rotates a given position inversely by this angle (2D rotation around the
z-axis).
|
org.apache.commons.math3.geometry.euclidean.threed.Vector3D |
applyTo(double x,
double y)
Rotates a given position by this angle (2D rotation around the z-axis).
|
org.apache.commons.math3.geometry.euclidean.threed.Vector3D |
applyTo(org.apache.commons.math3.geometry.euclidean.threed.Vector3D position)
Rotates a given position by this angle (2D rotation around the z-axis).
|
static Angle |
average(Angle[] angles)
Calculate the average of a number of Angles
|
static Angle |
average(Angle angle1,
Angle angle2)
Calculate the average of two Angles
|
static Angle |
averageArcTan(Angle[] angles)
Calculate the average of a number of Angles
|
static Angle |
averageVectors(Angle[] angles)
Calculate the average of a number of Angles
|
static Angle |
deg(double value)
Creates a normalized angle [-RAD180 to RAD180[
|
double |
degrees()
Retrieve the angle value in degrees
|
double |
degreesPositive()
Retrieve the angle value in non normalized 0...360 degrees value area
|
boolean |
equals(java.lang.Object obj) |
Angle |
getAdjacencyAngle() |
boolean |
isLeftOf(Angle angle2)
An angle is "left" of another if it is bigger, but by less than 180
degrees.
|
boolean |
isRightOf(Angle angle2)
An angle is "right" of another if it is not "left" of it
|
Angle |
negate() |
static Angle |
rad(double value)
Creates a normalized angle [-RAD180 to RAD180[
|
double |
radians()
Retrieve the angle value in rad
|
Angle |
subtract(Angle other)
Subtracts another angle object from this angle
|
Angle |
subtract(double value)
Subtracts a constant angle from this angle
|
java.lang.String |
toString() |
public static final Angle ANGLE_180
public static final Angle ANGLE_90
public static final Angle ZERO
public static Angle rad(double value)
value
- Angle in radpublic static Angle deg(double value)
value
- Angle in degreespublic double radians()
public double degrees()
public double degreesPositive()
public Angle add(Angle other)
other
- angle objectpublic Angle add(double value)
value
- Angle (in rad)public Angle subtract(Angle other)
other
- Angle object to subtractpublic Angle subtract(double value)
value
- Angle in radpublic boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isLeftOf(Angle angle2)
angle2
- second angle objectpublic boolean isRightOf(Angle angle2)
angle2
- second angle objectpublic static Angle average(Angle angle1, Angle angle2)
angle1
- first angle to useangle2
- second angle to usepublic static Angle averageArcTan(Angle[] angles)
angles
- Angles arraypublic static Angle averageVectors(Angle[] angles)
angles
- Angles arraypublic static Angle average(Angle[] angles)
angles
- Angles arraypublic org.apache.commons.math3.geometry.euclidean.threed.Vector3D applyTo(org.apache.commons.math3.geometry.euclidean.threed.Vector3D position)
position
- the position to rotatepublic org.apache.commons.math3.geometry.euclidean.threed.Vector3D applyInverseTo(org.apache.commons.math3.geometry.euclidean.threed.Vector3D position)
position
- the position to rotatepublic org.apache.commons.math3.geometry.euclidean.threed.Vector3D applyTo(double x, double y)
x
- the x position valuey
- the y position valuepublic org.apache.commons.math3.geometry.euclidean.threed.Vector3D applyInverseTo(double x, double y)
x
- the x position valuey
- the y position valuepublic Angle getAdjacencyAngle()
public Angle negate()