Skip to main content

Density

Type Alias Density 

Source
pub type Density = Qty<-3, 1, 0, 0, 0, 0, 0>;
Expand description

kg·m⁻³. Note that a glass catalogue quotes g/cm³, a factor of a thousand away — see Density::g_per_cm3.

Aliased Type§

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

Implementations§

Source§

impl Density

Source

pub fn g_per_cm3(v: f64) -> Density

The way a glass catalogue quotes it: N-BK7 is 2.51 g/cm³.

Source

pub fn kg_per_m3(v: f64) -> Density

Kilograms per cubic metre, which is what is stored.

Trait Implementations§

Source§

impl Mul<Qty<3, 0, 0, 0, 0, 0, 0>> for Density

Source§

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

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Volume) -> Mass

Performs the * operation. Read more