Crate temperature_converter

Crate temperature_converter 

Source
Expand description

temperature_converter — biblioteca para conversão de temperaturas.

§Exemplos

use temperature_converter::{celsius_to_kelvin, fahrenheit_to_celsius};

assert_eq!(celsius_to_kelvin(0.0).unwrap(), 273.15);
// função que retorna f64 puro, não Result:
assert_eq!(fahrenheit_to_celsius(32.0), 0.0);

Enums§

TemperatureError
Erros possíveis ao converter temperaturas

Functions§

celsius_to_fahrenheit
Converte Celsius para Fahrenheit.
celsius_to_kelvin
Converte Celsius para Kelvin.
fahrenheit_to_celsius
Converte Fahrenheit para Celsius.
kelvin_to_celsius
Converte Kelvin para Celsius.