All Packages Class Hierarchy This Package Previous Next Index
Class pnuts.ext.UnitSystem
pnuts.ext.UnitSystem
- public class UnitSystem
- implements QuantityFactory
This class defines a unit system in Pnuts.
When an identifier follows a decimal number, the identifier should
be one of the units symbols defined.
UnitSystem(["cm", "m"], [1, 100])
1cm + 1m ==> 101.000cm
-
UnitSystem(String[], Number[])
-
-
init()
-
-
make(Number, String)
-
-
make(Number, String)
-
-
setPrecision(int)
-
UnitSystem
public UnitSystem(String units[],
Number scale[])
init
public void init()
setPrecision
public void setPrecision(int prec)
make
public Object make(Number n,
String unit)
All Packages Class Hierarchy This Package Previous Next Index