(.js)
laraImport("lara.units.Unit");
(.lara)
import lara.units.Unit;
new Unit()
Base class that represents a unit of what is being measured in ANTAREX, e.g., time or energy.
This should not be instantiated directly.
convert(unit, value)
Converts the value, in the provided unit, to the unit this instance represents.
This presents a default implementation of the conversion assuming there is a factor table accessable throught the method _getFactorTable().
getName()
Returns the name of the unit.
This should not be called directly.