com.ijchart.xychart.util
Class AngleUtil

java.lang.Object
  extended by com.ijchart.xychart.util.AngleUtil

public abstract class AngleUtil
extends java.lang.Object

Title: IJChart

Description: a chart library for the Java(tm) platform.

Nice static helpers for working with angle.

Copyright: Copyright (c) 2013

Company:

Version:
1.0
Author:
zhang feng min,shanghai china. Contract me by email.

Constructor Summary
AngleUtil()
           
 
Method Summary
static double conversionAngle(double angle)
           Conversion angle, the rules are as follows: If the angle of the No.
static int getQuadrantByDegreeAngle(double angle)
           Calculated angle of the quadrant, the quadrant distribution as follows:
2 | 1
3 | 4
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
 

Constructor Detail

AngleUtil

public AngleUtil()
Method Detail

getQuadrantByRadianAngle

public static int getQuadrantByRadianAngle(double angle)
Calculated angle of the quadrant, the quadrant distribution as follows:
2 | 1

3 | 4

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:
2 | 1

3 | 4

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