|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--EDU.gatech.cc.is.util.Units
Routines for units conversion.
Copyright (c)2000 Tucker Balch
Field Summary | |
static double |
HUGE
A very large number |
static double |
PI2
Handy to have 2 PI around. |
Constructor Summary | |
Units()
|
Method Summary | |
static double |
BestTurnDeg(double start,
double finish)
Compute the best direction and angle to turn from the start angle to the finish angle in degrees. |
static double |
BestTurnRad(double start,
double finish)
Compute the best direction and angle to turn from the start angle to the finish angle in radians. |
static double |
ClipDeg(double deg)
Limit the angle to between 0 and 359.9999. |
static double |
ClipRad(double rad)
Limit the angle to between 0 and 2 PI. |
static double |
Deg10ToRad(int deg10)
Convert 10ths of degrees to radians. |
static double |
DegToRad(double deg)
Convert degrees to radians. |
static double |
DegToRad(int deg)
Convert degrees to radians. |
static double |
Inch10ToMeter(int inch10)
Convert 10ths of inches to meters. |
static double |
InchToMeter(double inch)
Convert inches to meters. |
static double |
InchToMeter(int inch)
Convert inches to meters. |
static void |
main(java.lang.String[] args)
Test the units functions. |
static double |
MeterToInch(double meter)
Convert meters to inches. |
static int |
MeterToInch10(double meter)
Convert meters to 10ths of inches. |
static double |
RadToDeg(double rad)
Convert radians to degrees. |
static int |
RadToDeg10(double rad)
Convert radians to 10ths of degrees. |
static double |
readDouble(java.io.StreamTokenizer in)
read a double from a stream. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final double PI2
public static final double HUGE
Constructor Detail |
public Units()
Method Detail |
public static double DegToRad(double deg)
deg
- double, degrees.public static double DegToRad(int deg)
deg
- int, degrees.public static double Deg10ToRad(int deg10)
deg10
- int, 10ths of degrees.public static double RadToDeg(double rad)
rad
- double, radians.public static int RadToDeg10(double rad)
rad
- double, radians.public static double InchToMeter(int inch)
inch
- int, inches.public static double InchToMeter(double inch)
inch
- double, inches.public static double Inch10ToMeter(int inch10)
inch
- int, inches.public static int MeterToInch10(double meter)
meter
- double, meters.public static double MeterToInch(double meter)
meter
- double, meters.public static double ClipRad(double rad)
rad
- double, angle in radians to be clipped.public static double ClipDeg(double deg)
deg
- double, angle in degrees to be clipped.public static double BestTurnDeg(double start, double finish)
start
- The starting angle.finish
- The desired angle.public static double readDouble(java.io.StreamTokenizer in) throws java.lang.Exception
in
- StreamTokenizer, the stream to read from.public static double BestTurnRad(double start, double finish)
start
- The starting angle.finish
- The desired angle.public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |