Converting between different units mostly imperial -> metric and metric -> imperial
- Source:
Methods
(inner) gallonsToLitres(quantity) → {number}
- Source:
Convert from gallons to litres
Parameters:
Name | Type | Description |
---|---|---|
quantity |
number |
Returns:
litres
- Type
- number
(inner) gramsPerKMtoGramsPerMiles(quantity) → {number}
- Source:
Grams per km to grams per miles
Parameters:
Name | Type | Description |
---|---|---|
quantity |
number |
Returns:
gallons
- Type
- number
(inner) hydrogenKgToLitres(value) → {number}
- Source:
Hydrogen kg to litres
Parameters:
Name | Type | Description |
---|---|---|
value |
number | hydrogen in kg |
Returns:
converted to litres
- Type
- number
(inner) kmToMiles(quantity, equivalence) → {number}
- Source:
Convert from kilometers to miles
Parameters:
Name | Type | Default | Description |
---|---|---|---|
quantity |
number | ||
equivalence |
boolean |
false
|
if true, return value so that 1km = 1mile |
Returns:
miles to 5 decimal places
- Type
- number
(inner) l100kmToMpg(quantity) → {number}
- Source:
Convert from litres per 100km to miles per gallon
Parameters:
Name | Type | Description |
---|---|---|
quantity |
number |
Returns:
miles per gallon
- Type
- number
(inner) litresToGallons(quantity) → {number}
- Source:
Convert from litres to gallons
Parameters:
Name | Type | Description |
---|---|---|
quantity |
number |
Returns:
gallons
- Type
- number
(inner) milesToKM(quantity, equivalence) → {number}
- Source:
Convert from miles to kilometers
Parameters:
Name | Type | Default | Description |
---|---|---|---|
quantity |
number | ||
equivalence |
boolean |
false
|
if true, return value so that 1mile = 1km |
Returns:
kilometers to 5 decimal places
- Type
- number
(inner) mpgToL100km(quantity) → {number}
- Source:
Convert from miles per gallon to litres per 100km
Parameters:
Name | Type | Description |
---|---|---|
quantity |
number |
Returns:
litres per 100km
- Type
- number