Class LengthUnit
Defined in: LengthUnit.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Unit used for lengths.
|
Field Attributes | Field Name and Description |
---|---|
<static> |
LengthUnit.CENTIMETER
Centimeter unit.
|
<static> |
LengthUnit.FOOT_DECIMALS
Inch unit with decimals.
|
<static> |
LengthUnit.INCH
Foot/Inch unit followed by fraction.
|
<static> |
LengthUnit.INCH_DECIMALS
Inch unit with decimals.
|
<static> |
LengthUnit.INCH_FRACTION
Inch unit followed by fraction.
|
<static> |
LengthUnit.METER
Meter unit.
|
<static> |
LengthUnit.MILLIMETER
Millimeter unit.
|
Method Attributes | Method Name and Description |
---|---|
<static> |
LengthUnit.centimeterToFoot(length)
|
<static> |
LengthUnit.centimeterToInch(length)
|
<static> |
LengthUnit.footToCentimeter(length)
|
<static> |
LengthUnit.getLocalizedUnit(unit)
Returns the unit name in default locale.
|
<static> |
LengthUnit.inchToCentimeter(length)
|
<static> |
LengthUnit.nameOf(unit)
Returns the enum name of the given unit.
|
<static> |
LengthUnit.valueOf(unitEnumName)
Gets a LengthUnit by its enum name
WARNING enum name (CENTIMETER, MILLIMETER, . |
Field Detail
<static>
LengthUnit.CENTIMETER
Centimeter unit.
<static>
LengthUnit.FOOT_DECIMALS
Inch unit with decimals.
- Since:
- 7.0
<static>
LengthUnit.INCH
Foot/Inch unit followed by fraction.
<static>
LengthUnit.INCH_DECIMALS
Inch unit with decimals.
<static>
LengthUnit.INCH_FRACTION
Inch unit followed by fraction.
- Since:
- 7.0
<static>
LengthUnit.METER
Meter unit.
<static>
LengthUnit.MILLIMETER
Millimeter unit.
Method Detail
<static>
LengthUnit.centimeterToFoot(length)
- Parameters:
- {number} length
- Returns the
length
given in centimeters converted to feet.
<static>
LengthUnit.centimeterToInch(length)
- Parameters:
- {number} length
- Returns the
length
given in centimeters converted to inches.
<static>
LengthUnit.footToCentimeter(length)
- Parameters:
- {number} length
- Returns the
length
given in feet converted to centimeters.
<static>
LengthUnit.getLocalizedUnit(unit)
Returns the unit name in default locale.
- Parameters:
- {string} unit
<static>
LengthUnit.inchToCentimeter(length)
- Parameters:
- {number} length
- Returns the
length
given in inches converted to centimeters.
<static>
LengthUnit.nameOf(unit)
Returns the enum name of the given unit.
WARNING enum name (CENTIMETERS, MILLIMETERS, ..) is different from unit's name (cm, mm, ..)
- Parameters:
- {LengthUnit} unit
<static>
{LengthUnit}
LengthUnit.valueOf(unitEnumName)
Gets a LengthUnit by its enum name
WARNING enum name (CENTIMETER, MILLIMETER, ..) is different from unit's name (cm, mm, ..)
WARNING enum name (CENTIMETER, MILLIMETER, ..) is different from unit's name (cm, mm, ..)
- Parameters:
- {string} unitEnumName
- Returns:
- {LengthUnit}