Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace units

Index

Functions

conversionScale

  • conversionScale(srcUnitType: string, destUnitType: string): number
  • 获取源单位和目标单位之间的转换比率.

    Parameters

    • srcUnitType: string

      unitType converting from.

    • destUnitType: string

      unitType converting to.

    Returns number

    Numeric ratio of the conversion.

isValidUnit

  • isValidUnit(tryUnit: string): boolean
  • 检查单位类型是否为有效的单位.

    Parameters

    • tryUnit: string

      unit type to check.

    Returns boolean

    Boolean true if unit type is valid.

Generated using TypeDoc