Class AngleUnit

Hierarchy-Diagram

UML class diagram of AngleUnit
Legend
icon for a class in the UML class diagram class

Hierarchy

Constructors

Properties

DEGREE: AngleUnit = ...
RADIAN: AngleUnit = ...
UNITS: Map<string, Unit> = ...
UNIT_BASES: Map<string, string> = ...
UNKNOWN: Unit = ...

Accessors

  • get aliases(): string[]
  • Unit aliases

    Returns string[]

    Alias names as array

Methods

  • Convert a value in the current unit to a target unit

    Type Parameters

    Parameters

    • value: T

      Value to convert

    • target: string | Unit

      Target unit

    Returns T

    Converted unit

  • Convert a value from a specific unit to a target unit

    Type Parameters

    Parameters

    • value: T

      Value to convert

    • from: string | Unit

      Source unit

    • to: string | Unit

      Target unit

    Returns T

    Converted unit

  • Find a unit by its name

    Parameters

    • name: string

      Unit name

    • Optional baseName: string

      Optional base name to specific result

    Returns Unit

    Unit if found