static int |
getQuadrantByRadianAngle(double angle)
Calculated angle of the quadrant, the quadrant distribution as follows:
2
| |
| 1
|
| 3
| |
| 4
|
static boolean |
isHorizontal(double angle)
Test whether or not angle is 0 or Math.PI |
static boolean |
isVertical(double angle)
Test whether or not angle is 0.5*Math.PI or 1.5*Math.PI |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AngleUtil
public AngleUtil()
getQuadrantByRadianAngle
public static int getQuadrantByRadianAngle(double angle)
-
Calculated angle of the quadrant, the quadrant distribution as follows:
- Parameters:
angle - double
The angle (in radians).
- Returns:
- int
getQuadrantByDegreeAngle
public static int getQuadrantByDegreeAngle(double angle)
-
Calculated angle of the quadrant, the quadrant distribution as follows:
- Parameters:
angle - double
The angle (in degree).
- Returns:
- int
conversionAngle
public static double conversionAngle(double angle)
-
Conversion angle, the rules are as follows: If the angle of the No. 2 quadrant,
the conversion angle to 4 quadrant; If the angle in the third quadrant
is converted to 1 quadrant.
- Parameters:
angle - double
The angle (in radians).
- Returns:
- double
The conversion angle.
isHorizontal
public static boolean isHorizontal(double angle)
-
Test whether or not angle is 0 or Math.PI
- Parameters:
angle - double
- Returns:
- boolean
isVertical
public static boolean isVertical(double angle)
-
Test whether or not angle is 0.5*Math.PI or 1.5*Math.PI
- Parameters:
angle - double
- Returns:
- boolean
|