Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DistanceUnit

DistanceUnit is an "enum" like which represent all distances unit available in the unit converter.

author

Nicolas GILLE nic.gille@gmail.com

since

0.2.0

version

1.0

license

MIT

implements

EnumUnit

see

https://en.wikipedia.org/wiki/Kilometre to implements all meters distances.

Hierarchy

  • DistanceUnit

Implements

Index

Properties

Optional symbol

symbol: string

Symbol of the unit.

Optional value

value: number

Unit value for conversion.

Static CENTIMETER

CENTIMETER: DistanceUnit = new DistanceUnit('cm', 10)

Static DECAMETER

DECAMETER: DistanceUnit = new DistanceUnit('dam', 10000)

Static DECIMETER

DECIMETER: DistanceUnit = new DistanceUnit('dm', 100)

Static HECTOMETER

HECTOMETER: DistanceUnit = new DistanceUnit('hm', 100000)

Static KILOMETER

KILOMETER: DistanceUnit = new DistanceUnit('km', 1000000)

Static METER

METER: DistanceUnit = new DistanceUnit('m', 1000)

Static MILLIMETER

MILLIMETER: DistanceUnit = new DistanceUnit('mm', 1)

Methods

Static value

  • Get a specific value of the enum.

    since

    0.2.0

    version

    1.0

    Parameters

    • symbol: string

      The name of the unit expected.

    Returns DistanceUnit

    The DistanceUnit expected.

Generated using TypeDoc