Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "geocortex/infrastructure/DistanceConverter"

Index

Functions

Functions

canConvert

  • canConvert(targetUnit: string, sourceUnit: string): boolean
  • Returns true if units are convertible.

    Parameters

    • targetUnit: string

      The type of unit we want to convert to

    • sourceUnit: string

      The type of unit we are converting from

    Returns boolean

convert

  • convert(targetUnit: string, distance: number, sourceUnit: string): number
  • Converts an unit to another

    Parameters

    • targetUnit: string

      The type of unit we want to convert to

    • distance: number

      Distance in original unit type

    • sourceUnit: string

      The type of unit we are converting from

    Returns number