Skip to content
This repository was archived by the owner on May 21, 2020. It is now read-only.

convert

Florian Rappl edited this page Dec 21, 2014 · 2 revisions

convert

The unit converter is able to convert some simple and more advanced units. This function understands the basic SI units, the CGS system and is able to use prefixes like k for kilo or M for Mega. See the usage examples for more information.

convert(value,from,to)

Converts the given value of the source unit to the target unit.

Argument value

Scalar

Argument from

String

Argument to

String

Returns 1. entry

Unit

Example

convert(1, "m/s", "km/h")

Converts 1 m/s to km/h resulting in 3.6 km/h.

convert(value,to)

Convert the given unit value to the target unit.

Argument value

Unit

Argument to

String

Returns 1. entry

Unit

Example

convert(unit(5, "yd"), "ft")

Converts the unit value 5 yards to feet. This yields 15 ft.

Clone this wiki locally