aboutsummaryrefslogtreecommitdiffstats
path: root/src/temperature.rs
blob: 2eac48d2c4bb1147c6f9396cbdeeb2d78c238f2f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
pub struct Temperature(f64); // Base unit is kelvin

impl Temperature {
    pub fn from_kelvin(kelvin: f64) -> Temperature {
        Temperature(kelvin)
    }

    pub fn as_kelvin(&self) -> f64 {
        self.0
    }
}