henchman v0.3.0 Henchman.Converter.Length

Summary

Functions

convert(value, from, to, show_unit \\ false, precision \\ 4)

Length unit conversion.

Supported unit

  • :millimetre
  • :centimetre
  • :metre
  • :kilometre
  • :inch
  • :foot
  • :mile

Example

iex> Henchman.Converter.Length(1, :metre, :kilometre)#0.001
iex> Henchman.Converter.Length(1, :metre, :centimetre, true)#100.0 cm