public class TemperatureConversion extends Object
Modifier and Type | Field and Description |
---|---|
static double |
ABSOLUTE_ZERO_CELSIUS |
static double |
ABSOLUTE_ZERO_FARENHEIT |
static double |
ABSOLUTE_ZERO_KELVIN |
static double |
ABSOLUTE_ZERO_RANKINE |
Constructor and Description |
---|
TemperatureConversion() |
Modifier and Type | Method and Description |
---|---|
static double |
convert(TemperatureScale from,
TemperatureScale to,
double temperature)
Convert a temperature value from one temperature scale to another.
|
static double |
convertCelsiusToFarenheit(double temperature)
Convert temperature from Celsius to Farenheit temperature scale
FORMULA = [°F] = [°C] × 9/5 + 32
|
static double |
convertCelsiusToKelvin(double temperature)
Convert temperature from Celsius to Kelvin temperature scale
FORMULA = [K] = [°C] + 273.15
|
static double |
convertCelsiusToRankine(double temperature)
Convert temperature from Celsius to Rankine temperature scale
FORMULA = [°R] = ([°C] + 273.15) × 9/5
|
static double |
convertFarenheitToCelsius(double temperature)
Convert temperature from Farenheit to Celsius temperature scale
FORMULA = [°C] = ([°F] − 32) × 5/9
|
static double |
convertFarenheitToKelvin(double temperature)
Convert temperature from Farenheit to Kelvin temperature scale
FORMULA = [K] = ([°F] + 459.67) × 5/9
|
static double |
convertFarenheitToRankine(double temperature)
Convert temperature from Farenheit to Rankine temperature scale
FORMULA = [°R] = [°F] + 459.67
|
static double |
convertFromCelsius(TemperatureScale to,
double temperature)
Convert a temperature value from the Celsius temperature scale to another.
|
static double |
convertFromFarenheit(TemperatureScale to,
double temperature)
Convert a temperature value from the Farenheit temperature scale to another.
|
static double |
convertFromKelvin(TemperatureScale to,
double temperature)
Convert a temperature value from the Kelvin temperature scale to another.
|
static double |
convertFromRankine(TemperatureScale to,
double temperature)
Convert a temperature value from the Rankine temperature scale to another.
|
static double |
convertKelvinToCelsius(double temperature)
Convert temperature from Kelvin to Celsius temperature scale
FORMULA = [°C] = [K] − 273.15
|
static double |
convertKelvinToFarenheit(double temperature)
Convert temperature from Kelvin to Farenheit temperature scale
FORMULA = [°F] = [K] × 9/5 − 459.67
|
static double |
convertKelvinToRankine(double temperature)
Convert temperature from Kelvin to Rankine temperature scale
FORMULA = [°R] = [K] × 9/5
|
static double |
convertRankineToCelsius(double temperature)
Convert temperature from Rankine to Celsius temperature scale
FORMULA = [°C] = ([°R] − 491.67) × 5/9
|
static double |
convertRankineToFarenheit(double temperature)
Convert temperature from Rankine to Farenheit temperature scale
FORMULA = [°F] = [°R] − 459.67
|
static double |
convertRankineToKelvin(double temperature)
Convert temperature from Rankine to Kelvin temperature scale
FORMULA = [K] = [°R] × 5/9
|
static double |
convertToCelsius(TemperatureScale from,
double temperature)
Convert a temperature value from another temperature scale into the Celsius temperature scale.
|
static double |
convertToFarenheit(TemperatureScale from,
double temperature)
Convert a temperature value from another temperature scale into the Farenheit temperature scale.
|
static double |
convertToKelvin(TemperatureScale from,
double temperature)
Convert a temperature value from another temperature scale into the Kelvin temperature scale.
|
static double |
convertToRankine(TemperatureScale from,
double temperature)
Convert a temperature value from another temperature scale into the Rankine temperature scale.
|
public static final double ABSOLUTE_ZERO_CELSIUS
public static final double ABSOLUTE_ZERO_FARENHEIT
public static final double ABSOLUTE_ZERO_KELVIN
public static final double ABSOLUTE_ZERO_RANKINE
public TemperatureConversion()
public static double convert(TemperatureScale from, TemperatureScale to, double temperature)
from
- TemperatureScaleto
- TemperatureScaletemperature
- valuepublic static double convertFromFarenheit(TemperatureScale to, double temperature)
to
- TemperatureScaletemperature
- value in degrees Farenheitpublic static double convertToFarenheit(TemperatureScale from, double temperature)
from
- TemperatureScaletemperature
- value from other scalepublic static double convertFromCelsius(TemperatureScale to, double temperature)
to
- TemperatureScaletemperature
- value in degrees centigradepublic static double convertToCelsius(TemperatureScale from, double temperature)
from
- TemperatureScaletemperature
- value from other scalepublic static double convertFromKelvin(TemperatureScale to, double temperature)
to
- TemperatureScaletemperature
- value in Kelvinpublic static double convertToKelvin(TemperatureScale from, double temperature)
from
- TemperatureScaletemperature
- value from other scalepublic static double convertFromRankine(TemperatureScale to, double temperature)
to
- TemperatureScaletemperature
- value in degrees Rankinepublic static double convertToRankine(TemperatureScale from, double temperature)
from
- TemperatureScaletemperature
- value from other scalepublic static double convertFarenheitToCelsius(double temperature)
temperature
- value in degrees Farenheitpublic static double convertFarenheitToKelvin(double temperature)
temperature
- value in degrees Farenheitpublic static double convertFarenheitToRankine(double temperature)
temperature
- value in degrees Farenheitpublic static double convertCelsiusToFarenheit(double temperature)
temperature
- value in degrees Celsiuspublic static double convertCelsiusToKelvin(double temperature)
temperature
- value in degrees Celsiuspublic static double convertCelsiusToRankine(double temperature)
temperature
- value in degrees Celsiuspublic static double convertKelvinToCelsius(double temperature)
temperature
- value in degrees Kelvinpublic static double convertKelvinToFarenheit(double temperature)
temperature
- value in degrees Kelvinpublic static double convertKelvinToRankine(double temperature)
temperature
- value in degrees Kelvinpublic static double convertRankineToFarenheit(double temperature)
temperature
- value in degrees Rankinepublic static double convertRankineToCelsius(double temperature)
temperature
- value in degrees Rankinepublic static double convertRankineToKelvin(double temperature)
temperature
- value in degrees RankineCopyright © 2012–2021 Pi4J. All rights reserved.