|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.pdx.starview.calc.SVAngle
General Purpose angle representation that can quickly and easily do calculations on an angle. Credits: This code was based on the source for KStars-20040229
Constructor Summary | |
SVAngle()
Default Constructor |
|
SVAngle(double x)
Alternate constructor. |
|
SVAngle(int d,
int m,
int s,
int ms)
Default Constructor. |
|
SVAngle(SVAngle d)
Copy-Constructor |
Method Summary | |
double |
acos()
|
double |
asin()
|
double |
atan()
|
double |
cos()
|
double |
Degrees()
|
int |
getArcmin()
|
int |
getArcsec()
|
int |
getDegree()
|
SVAngle |
getDiff(SVAngle rhs)
|
java.lang.String |
getDMSString()
|
java.lang.String |
getHMSString()
|
int |
getHour()
|
double |
getHours()
|
int |
getMarcsec()
|
int |
getMinute()
|
int |
getMsecond()
|
double |
getRadians()
|
SVAngle |
getReducedDiff(SVAngle rhs)
|
int |
getSecond()
|
static double |
normalizeRadians(double r)
|
void |
set(SVAngle d)
Copy value of another dms angle |
void |
setD(double x)
Sets floating-point value of angle, in degrees. |
void |
setD(int d,
int m,
int s,
int ms)
Sets floating-point value of angle, in degrees. |
void |
setH(double x)
converts argument from hours to degrees, then sets floating-point value of angle, in degrees. |
void |
setH(int h,
int m,
int s,
int ms)
Set from HMS notation |
void |
setRadians(double Rad)
Set angle according to the argument, which is in radians |
double |
sin()
|
double |
tan()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public SVAngle(int d, int m, int s, int ms)
d
- degree portion of angle (int). Defaults to zero.m
- arcminute portion of angle (int). Defaults to zero.s
- arcsecond portion of angle (int). Defaults to zero.ms
- arcsecond portion of angle (int). Defaults to zero.public SVAngle(SVAngle d)
d
- Source to set degree value from.public SVAngle()
public SVAngle(double x)
x
- angle expressed as a floating-point number (in degrees)Method Detail |
public void setD(double x)
x
- new angle (double)public void setD(int d, int m, int s, int ms)
d
- integer degrees portion of anglem
- integer arcminutes portion of angles
- integer arcseconds portion of anglems
- integer arcseconds portion of anglepublic double Degrees()
public void set(SVAngle d)
d
- set angle according to this dms objectpublic double getRadians()
public double sin()
public double cos()
public double tan()
public double acos()
public double atan()
public double asin()
public void setRadians(double Rad)
public double getHours()
public int getArcmin()
public int getArcsec()
public int getMarcsec()
public int getHour()
public int getMinute()
public int getSecond()
public int getMsecond()
public int getDegree()
public java.lang.String getDMSString()
public java.lang.String getHMSString()
public void setH(double x)
x
- new angle, in hours (double)public void setH(int h, int m, int s, int ms)
h
- Hoursm
- Minutess
- Secondsms
- Milisecondspublic java.lang.String toString()
public static double normalizeRadians(double r)
public SVAngle getReducedDiff(SVAngle rhs)
public SVAngle getDiff(SVAngle rhs)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |