|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectlogist.Measures
public class Measures
Defines unit conversions between external values from XML files (e.g. kilometers) and internal representations (e.g. distance units). The platform avoids the use of floating point number to increase precision and avoid non-determinism.
| Field Summary | |
|---|---|
static long |
DISTANCE_UNITS_PER_KM
The number of distance units in a kilometer. |
static long |
NANOS_PER_SIM_HOUR
The time (in nanos) that it takes to animate one hour of simulation (in GUI mode). |
| Constructor Summary | |
|---|---|
Measures()
|
|
| Method Summary | |
|---|---|
static long |
kmToUnits(double kilometers)
Convert kilometers to distance units. |
static double |
unitsToKM(long units)
Convert distance units to kilometers. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final long DISTANCE_UNITS_PER_KM
public static final long NANOS_PER_SIM_HOUR
| Constructor Detail |
|---|
public Measures()
| Method Detail |
|---|
public static long kmToUnits(double kilometers)
kilometers - the distance in kmpublic static double unitsToKM(long units)
units - the distance in units
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||