Skip to content

Commit

Permalink
add ton_l/s per cubic foot
Browse files Browse the repository at this point in the history
  • Loading branch information
cutlerjake committed Oct 24, 2024
1 parent d385d79 commit e6c0d55
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/si/mass_density.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ quantity! {
"long tons per cubic yard";
@ton_short_per_cubic_yard: 1.186_552_724_990_710_2_E3; "2000 lb/yd³",
"short ton per cubic yard", "short tons per cubic yard";
@ton_long_per_cubic_foot: 3.588_135_685_996_147_4E4; "2240 lb/ft³",
"long ton per cubic foot", "long tons per cubic foot";
@ton_short_per_cubic_foot: 3.203_692_147_961_372_8E4; "2000 lb/ft³",
"short ton per cubic foot", "short tons per cubic foot";
}
}

Expand Down Expand Up @@ -172,6 +176,8 @@ mod test {
test::<m::slug, v::cubic_foot, d::slug_per_cubic_foot>();
test::<m::ton_long, v::cubic_yard, d::ton_long_per_cubic_yard>();
test::<m::ton_short, v::cubic_yard, d::ton_short_per_cubic_yard>();
test::<m::ton_long, v::cubic_foot, d::ton_long_per_cubic_foot>();
test::<m::ton_short, v::cubic_foot, d::ton_short_per_cubic_foot>();

fn test<M: m::Conversion<V>, U: v::Conversion<V>, D: d::Conversion<V>>() {
Test::assert_approx_eq(&MassDensity::new::<D>(V::one()),
Expand Down

0 comments on commit e6c0d55

Please sign in to comment.