Class Index | File Index

Classes


Class VelocityUnit


Extends Measurement.
Create a new speed measurement instance.
Defined in: VelocityUnit.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
VelocityUnit(options)
Method Summary
Method Attributes Method Name and Description
<static>  
VelocityUnit.convert(to, from, speed)
Convert a speed to another measure.
 
Return the type of this measurement.
 
newUnit(params)
Return a new instance of this type of measurement.
Class Detail
VelocityUnit(options)
Parameters:
options
{{unit:string,amount:number|string|undefined}} Options controlling the construction of this instance
Method Detail
<static> {number|undefined} VelocityUnit.convert(to, from, speed)
Convert a speed to another measure.
Parameters:
to
{string} unit to convert to
from
{string} unit to convert from
speed
{number} amount to be convert
Returns:
{number|undefined} the converted amount

{string} getMeasure()
Return the type of this measurement. Examples are "mass", "length", "speed", etc. Measurements can only be converted to measurements of the same type.

The type of the units is determined automatically from the units. For example, the unit "grams" is type "mass". Use the static call Measurement.getAvailableUnits to find out what units this version of ilib supports.

Returns:
{string} the name of the type of this measurement

{Measurement} newUnit(params)
Return a new instance of this type of measurement.
Parameters:
{Object} params
parameters to the constructor
Returns:
{Measurement} a measurement subclass instance

Documentation generated by JsDoc Toolkit 2.4.0 on Thu Nov 15 2018 17:45:08 GMT-0800 (PST)