|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectphysics.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(java.lang.Object o)
Compares this object with the specified object for order. |
double |
cos()
|
boolean |
equals(Angle a)
|
boolean |
equals(java.lang.Object o)
|
int |
hashCode()
|
Angle |
minus(Angle a)
|
Angle |
plus(Angle a)
|
double |
radians()
|
double |
sin()
|
double |
tan()
|
java.lang.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)
public Angle(double x,
double y)
| Method Detail |
|---|
public double cos()
public double sin()
public double tan()
public double radians()
public int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparablejava.lang.ClassCastException - if o is not an Angle
java.lang.NullPointerException - if o is nullpublic int compareTo(Angle c)
java.lang.NullPointerException - if c is nullpublic Angle plus(Angle a)
this + a.public Angle minus(Angle a)
this - a.public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(Angle a)
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||