C# Class CyrusBuilt.MonoPi.Components.Temperature.TemperatureConversion

Temperature conversion utilities.
ファイルを表示 Open project: cyrusbuilt/MonoPi Class Usage Examples

Public Methods

Method Description
Convert ( TemperatureScale from, TemperatureScale to, Double temp ) : Double

Converts the specified temperature from one scale to another.

ConvertCelciusToFarenheit ( Double temp ) : Double

Converts the temperature from Celcius to Farenheit scale. Formula = [F] = [C] x 9/5 + 32.

ConvertCelciusToKelvin ( Double temp ) : Double

Converts the temperature from Celcius to Kelvin scale. Formula = [K] = [C] + 273.15.

ConvertCelciusToRankine ( Double temp ) : Double

Converts the temperature from Celcius to Rankine scale. Formula = [R] = ([C] + 273.15) x 9/5.

ConvertFarenheitToCelcius ( Double temp ) : Double

Converts the temperature from Farenheit to Celcius scale. Formula = [C] = ([F] - 32) x 5/9.

ConvertFarenheitToKelvin ( Double temp ) : Double

Converts the temperature from Farenheit to Kelvin scale. Formula = [K] = ([F] + 459.67) x 5/9.

ConvertFarenheitToRankine ( Double temp ) : Double

Converts the temperature from Farenheit to Rankine scale. Formula = [R] = [F] + 459.67.

ConvertFromCelcius ( TemperatureScale scale, Double temp ) : Double

Converts the specified temperature value in degrees Celcius to the specified scale.

ConvertFromFarenheit ( TemperatureScale scale, Double temp ) : Double

Convert the temperature in degrees Farenheit to the specified scale.

ConvertFromKelvin ( TemperatureScale scale, Double temp ) : Double

Converts the specified temperature from Kelvin to the specified scale.

ConvertFromRankine ( TemperatureScale scale, Double temp ) : Double

Converts the specified temperature in Rankine to the specified scale.

ConvertKelvinToCelcius ( Double temp ) : Double

Converts the temperature from Kelvin to Celcius scale. Formula = [C] = [K] - 273.15.

ConvertKelvinToFarenheit ( Double temp ) : Double

Converts the temperature from Kelvin to Farenheit scale. Formula = [F] = [K] x 9/5 - 459.67.

ConvertKelvinToRankine ( Double temp ) : Double

Converts the temperature from Kelvin to Rankine scale. Formula = [R] = [K] x 9/5.

ConvertRankineToCelcius ( Double temp ) : Double

Converts the temperature from Rankine to Celcius scale. Formula = [C] = ([R] - 491.67) x 5/9.

ConvertRankineToFarenheit ( Double temp ) : Double

Converts the temperature from Rankine to Farenheit scale. Formula = [F] = [R] - 459.67.

ConvertRankineToKelvin ( Double temp ) : Double

Converts the temperature from Rankine to Kelvin scale. Formula = [K] = [R] x 5/9.

ConvertToCelcius ( TemperatureScale scale, Double temp ) : Double

Converts the specified temperature to the specified Celcius scale.

ConvertToFarenheit ( TemperatureScale scale, Double temp ) : Double

Converts the specified temperature value to Farenheit scale.

ConvertToKelvin ( TemperatureScale scale, Double temp ) : Double

Converts the specified value from the specified scale to degrees Kelvin.

ConvertToRankine ( TemperatureScale scale, Double temp ) : Double

Converts the specified temperature value to Rankine scale.

Method Details

Convert() public static method

Converts the specified temperature from one scale to another.
public static Convert ( TemperatureScale from, TemperatureScale to, Double temp ) : Double
from TemperatureScale /// The scale to convert the temperature from. ///
to TemperatureScale /// The scale to convert the temperature to. ///
temp Double /// The temperature value to convert. ///
return Double

ConvertCelciusToFarenheit() public static method

Converts the temperature from Celcius to Farenheit scale. Formula = [F] = [C] x 9/5 + 32.
public static ConvertCelciusToFarenheit ( Double temp ) : Double
temp Double /// The temperature in degrees Celcius. ///
return Double

ConvertCelciusToKelvin() public static method

Converts the temperature from Celcius to Kelvin scale. Formula = [K] = [C] + 273.15.
public static ConvertCelciusToKelvin ( Double temp ) : Double
temp Double /// The temperature in degrees Celcius ///
return Double

ConvertCelciusToRankine() public static method

Converts the temperature from Celcius to Rankine scale. Formula = [R] = ([C] + 273.15) x 9/5.
public static ConvertCelciusToRankine ( Double temp ) : Double
temp Double /// The temperature in degrees Celcius. ///
return Double

ConvertFarenheitToCelcius() public static method

Converts the temperature from Farenheit to Celcius scale. Formula = [C] = ([F] - 32) x 5/9.
public static ConvertFarenheitToCelcius ( Double temp ) : Double
temp Double /// The temperature in degrees Farenheit. ///
return Double

ConvertFarenheitToKelvin() public static method

Converts the temperature from Farenheit to Kelvin scale. Formula = [K] = ([F] + 459.67) x 5/9.
public static ConvertFarenheitToKelvin ( Double temp ) : Double
temp Double /// The temperature in degrees Farenheit. ///
return Double

ConvertFarenheitToRankine() public static method

Converts the temperature from Farenheit to Rankine scale. Formula = [R] = [F] + 459.67.
public static ConvertFarenheitToRankine ( Double temp ) : Double
temp Double /// The temperature in degrees Farenheit. ///
return Double

ConvertFromCelcius() public static method

Converts the specified temperature value in degrees Celcius to the specified scale.
public static ConvertFromCelcius ( TemperatureScale scale, Double temp ) : Double
scale TemperatureScale /// The scale to convert the temperature value to. ///
temp Double /// The temperature in degrees Celcius. ///
return Double

ConvertFromFarenheit() public static method

Convert the temperature in degrees Farenheit to the specified scale.
public static ConvertFromFarenheit ( TemperatureScale scale, Double temp ) : Double
scale TemperatureScale /// The scale to convert to. ///
temp Double /// The temperature in degrees Farenheit. ///
return Double

ConvertFromKelvin() public static method

Converts the specified temperature from Kelvin to the specified scale.
public static ConvertFromKelvin ( TemperatureScale scale, Double temp ) : Double
scale TemperatureScale /// The scale to convert to. ///
temp Double /// The temperature in degrees Kelvin. ///
return Double

ConvertFromRankine() public static method

Converts the specified temperature in Rankine to the specified scale.
public static ConvertFromRankine ( TemperatureScale scale, Double temp ) : Double
scale TemperatureScale /// The scale to convert the specified Rankine value to. ///
temp Double /// The temperature value in degrees Rankine. ///
return Double

ConvertKelvinToCelcius() public static method

Converts the temperature from Kelvin to Celcius scale. Formula = [C] = [K] - 273.15.
public static ConvertKelvinToCelcius ( Double temp ) : Double
temp Double /// The temperature in degress Kelvin. ///
return Double

ConvertKelvinToFarenheit() public static method

Converts the temperature from Kelvin to Farenheit scale. Formula = [F] = [K] x 9/5 - 459.67.
public static ConvertKelvinToFarenheit ( Double temp ) : Double
temp Double /// The temperature in degrees Kelvin. ///
return Double

ConvertKelvinToRankine() public static method

Converts the temperature from Kelvin to Rankine scale. Formula = [R] = [K] x 9/5.
public static ConvertKelvinToRankine ( Double temp ) : Double
temp Double /// The temperature in degrees Kelvin. ///
return Double

ConvertRankineToCelcius() public static method

Converts the temperature from Rankine to Celcius scale. Formula = [C] = ([R] - 491.67) x 5/9.
public static ConvertRankineToCelcius ( Double temp ) : Double
temp Double /// The temperature in degrees Rankine. ///
return Double

ConvertRankineToFarenheit() public static method

Converts the temperature from Rankine to Farenheit scale. Formula = [F] = [R] - 459.67.
public static ConvertRankineToFarenheit ( Double temp ) : Double
temp Double /// The temperature in degrees Rankine. ///
return Double

ConvertRankineToKelvin() public static method

Converts the temperature from Rankine to Kelvin scale. Formula = [K] = [R] x 5/9.
public static ConvertRankineToKelvin ( Double temp ) : Double
temp Double /// The temperature in degrees Rankine. ///
return Double

ConvertToCelcius() public static method

Converts the specified temperature to the specified Celcius scale.
public static ConvertToCelcius ( TemperatureScale scale, Double temp ) : Double
scale TemperatureScale /// The scale to convert to Celcius. ///
temp Double /// The temperature value. ///
return Double

ConvertToFarenheit() public static method

Converts the specified temperature value to Farenheit scale.
public static ConvertToFarenheit ( TemperatureScale scale, Double temp ) : Double
scale TemperatureScale /// The scale to convert the temperature from. ///
temp Double /// The temperature value in the specified scale. ///
return Double

ConvertToKelvin() public static method

Converts the specified value from the specified scale to degrees Kelvin.
public static ConvertToKelvin ( TemperatureScale scale, Double temp ) : Double
scale TemperatureScale /// The temperature scale to convert the value from. ///
temp Double /// The temperature value to convert. ///
return Double

ConvertToRankine() public static method

Converts the specified temperature value to Rankine scale.
public static ConvertToRankine ( TemperatureScale scale, Double temp ) : Double
scale TemperatureScale /// The temperature scale to convert from. ///
temp Double /// The temperature value to convert to Rankine scale. ///
return Double