Options
All
  • Public
  • Public/Protected
  • All
Menu

This class converts temperature from one to another unit

All methods Like celciusToFahreheit or others does just the same, converting from the first unit to the second unit.

Hierarchy

  • ConvertTemperature

Index

Methods

celciusToFahrenheit

  • celciusToFahrenheit(temperature: number): number

celciusToKelvin

  • celciusToKelvin(temperature: number): number

convertToOtherUnit

  • convertToOtherUnit(temperature: number, firstUnit: string, secondUnit: string): number
  • Getting converted temperature number from one to another unit

    This is inserted to meet Single Responsibility and managing dependencies

    default

    return If secondUnit is not a known unit, it converts the given temperature authomatically to Celius

    Parameters

    • temperature: number
    • firstUnit: string
    • secondUnit: string

    Returns number

    this method the converted Temperature number

fahrenheitToCelcius

  • fahrenheitToCelcius(temperature: number): number

fahrenheitToKelvin

  • fahrenheitToKelvin(temperature: number): number

kelvinToCelcius

  • kelvinToCelcius(temperature: number): number

kelvinToFahrenheit

  • kelvinToFahrenheit(temperature: number): number

Generated using TypeDoc