|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectphysics3d.Angle
public final class Angle
Angle is an immutable abstract data type which represents the
mathematical notion of an angle. Angle represents a
non-negative angle less than 360 degrees or 2*pi radians.
| Field Summary | |
|---|---|
static Angle |
DEG_135
A 135-degree angle |
static Angle |
DEG_180
A 180-degree angle |
static Angle |
DEG_225
A 225-degree angle |
static Angle |
DEG_270
A 270-degree angle |
static Angle |
DEG_315
A 315-degree angle |
static Angle |
DEG_45
A 45-degree angle |
static Angle |
DEG_90
A 90-degree angle |
static Angle |
RAD_PI
An angle of pi radians |
static Angle |
RAD_PI_OVER_FOUR
An angle of pi/4 radians |
static Angle |
RAD_PI_OVER_TWO
An angle of pi/2 radians |
static Angle |
ZERO
A zero-degree or zero-radian angle |
| Constructor Summary | |
|---|---|
Angle(double radians)
|
|
Angle(double x,
double y)
|
|
| Method Summary | |
|---|---|
int |
compareTo(Angle c)
Compares this object with the specified object for order. |
int |
compareTo(Object o)
Compares this object with the specified object for order. |
double |
cos()
|
double |
degrees()
|
boolean |
equals(Angle a)
|
boolean |
equals(Object o)
|
int |
hashCode()
|
Angle |
minus(Angle a)
|
Angle |
plus(Angle a)
|
double |
radians()
|
double |
sin()
|
double |
tan()
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Angle ZERO
public static final Angle DEG_45
public static final Angle DEG_90
public static final Angle DEG_135
public static final Angle DEG_180
public static final Angle DEG_225
public static final Angle DEG_270
public static final Angle DEG_315
public static final Angle RAD_PI_OVER_FOUR
public static final Angle RAD_PI_OVER_TWO
public static final Angle RAD_PI
| Constructor Detail |
|---|
public Angle(double radians)
Angle with radians radians.
public Angle(double x,
double y)
Angle that is formed between the
positive x-axis and the line from the origin to (x,
y).| Method Detail |
|---|
public double cos()
public double sin()
public double tan()
public double radians()
public double degrees()
public int compareTo(Object o)
compareTo in interface ComparableClassCastException - if o is not an Angle
NullPointerException - if o is nullpublic int compareTo(Angle c)
NullPointerException - if c is nullpublic Angle plus(Angle a)
this + a.a is not nullpublic Angle minus(Angle a)
this - a.a is not nullpublic String toString()
toString in class Objectpublic boolean equals(Angle a)
public boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||