Skip to main content

Temperature

Type Alias Temperature 

Source
pub type Temperature = Qty<0, 0, 0, 0, 1, 0, 0>;
Expand description

Absolute temperature. Kelvin only — see Temperature::celsius.

Aliased Type§

pub struct Temperature(/* private fields */);

Implementations§

Source§

impl Temperature

Source

pub fn kelvin(v: f64) -> Temperature

Kelvin, which is what is stored.

Source

pub fn celsius(v: f64) -> Temperature

Celsius is an offset scale, not a scaled one, which is why it gets a named constructor rather than a factor: 20 °C is 293.15 K, and a temperature difference of 20 K is a different thing entirely.

Source

pub fn in_celsius(self) -> f64

As degrees Celsius. Subtracts the offset; see Temperature::celsius.

Trait Implementations§

Source§

impl Mul<Qty<2, 0, -2, 0, -1, 0, 0>> for Temperature

Source§

type Output = Qty<2, 0, -2, 0, 0, 0, 0>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: SpecificHeat) -> LatentHeat

Performs the * operation. Read more
Source§

impl Mul<Qty<2, 1, -2, 0, -1, 0, 0>> for Temperature

Source§

type Output = Qty<2, 1, -2, 0, 0, 0, 0>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: HeatCapacity) -> Energy

Performs the * operation. Read more
Source§

impl Mul<Qty<2, 1, -3, 0, -1, 0, 0>> for Temperature

Source§

type Output = Qty<2, 1, -3, 0, 0, 0, 0>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Conductance) -> Power

Performs the * operation. Read more