JMA5Y5NRAJTFKOGC566XCNN4POP6ON6PBB52RUPSCJFHZGIEEIQAC
An enum representing the different Temperature scales.
These are the available temperature scales to be converted between with this script.
*/
An enum representing the different Temperature scales.
These are the available temperature scales to be converted with this script.
*/
Temperature::Fahrenheit(degrees) => (degrees - 32.0) / 1.8,
Temperature::Fahrenheit(degrees) => ((degrees - 32.0) / 1.8) + 273.15,
Temperature::Fahrenheit(degrees) => (degrees + 456.67),
Temperature::Celsius(degrees) => (degrees * 1.8) + 32.0,
Temperature::Celsius(degrees) => (degrees + 273.15),
Temperature::Celsius(degrees) => ((degrees + 273.15) * 9.0 / 5.0),
Temperature::Kelvin(degrees) => (degrees - 273.15),
Temperature::Kelvin(degrees) => ((degrees - 273.15) * 1.8) + 32.0,
Temperature::Kelvin(degrees) => (degrees * 9.0 / 5.0),
Temperature::Rankine(degrees) => ((degrees - 491.67) * 5.0 / 9.0),
Temperature::Rankine(degrees) => (degrees * 9.0 / 5.0 - 459.67),
Temperature::Rankine(degrees) => (degrees * 5.0 / 9.0),
Fahrenheit(degrees) => {
(degrees - 32.0) / 1.8
},
Fahrenheit(degrees) => {
((degrees - 32.0) / 1.8) + 273.15
},
Fahrenheit(degrees) => {
degrees + 456.67
},
Celsius(degrees) => {
(degrees * 1.8) + 32.0
},
Celsius(degrees) => {
degrees + 273.15
},
Celsius(degrees) => {
(degrees + 273.15) * 9.0 / 5.0
},
Kelvin(degrees) => {
degrees - 273.15
},
Kelvin(degrees) => {
((degrees - 273.15) * 1.8) + 32.0
},
Kelvin(degrees) => {
degrees * 9.0 / 5.0
},
Rankine(degrees) => {
(degrees - 491.67) * 5.0 / 9.0
},
Rankine(degrees) => {
degrees * 9.0 / 5.0 - 459.67
},
Rankine(degrees) => {
degrees * 5.0 / 9.0
},
Temperature::Celsius(degrees) => println!("{}C = {}F", degrees, convert_temp(temperature)),
Temperature::Celsius(degrees) => println!("{}C = {}K", degrees, convert_temp(temperature)),
Temperature::Celsius(degrees) => println!("{}C = {}R", degrees, convert_temp(temperature)),
Temperature::Kelvin(degrees) => println!("{}K = {}C", degrees, convert_temp(temperature)),
Temperature::Kelvin(degrees) => println!("{}K = {}F", degrees, convert_temp(temperature)),
Temperature::Kelvin(degrees) => println!("{}K = {}R", degrees, convert_temp(temperature)),
Temperature::Rankine(degrees) => println!("{}R = {}C", degrees, convert_temp(temperature)),
Temperature::Rankine(degrees) => println!("{}R = {}F", degrees, convert_temp(temperature)),
Temperature::Rankine(degrees) => println!("{}R = {}K", degrees, convert_temp(temperature)),
Celsius(degrees) => {
println!("{}C = {}F", degrees, convert_temp(temperature))
},
Celsius(degrees) => {
println!("{}C = {}K", degrees, convert_temp(temperature))
},
Celsius(degrees) => {
println!("{}C = {}R", degrees, convert_temp(temperature))
},
Kelvin(degrees) => {
println!("{}K = {}C", degrees, convert_temp(temperature))
},
Kelvin(degrees) => {
println!("{}K = {}F", degrees, convert_temp(temperature))
},
Kelvin(degrees) => {
println!("{}K = {}R", degrees, convert_temp(temperature))
},
Rankine(degrees) => {
println!("{}R = {}C", degrees, convert_temp(temperature))
},
Rankine(degrees) => {
println!("{}R = {}F", degrees, convert_temp(temperature))
},
Rankine(degrees) => {
println!("{}R = {}K", degrees, convert_temp(temperature))
},