Skip to content

Commit

Permalink
Merge pull request #399 from Eagle941/new_units_pressure_volumerate
Browse files Browse the repository at this point in the history
Added units liter_per_minute and newton_per_square_millimeter
  • Loading branch information
iliekturtles authored Jan 20, 2023
2 parents dca2031 + 1cc23be commit aab4751
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/si/pressure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ quantity! {
@inch_of_water_60: 2.488_4_E2; "in H₂O (60 °F)", "inch of water (60 °F)",
"inches of water (60 °F)";
@inch_of_water: 2.490_889_E2; "in H₂O", "inch of water", "inches of water";
@newton_per_square_millimeter: 1.0_E6; "N/mm²", "newton per square millimeter",
"newtons per square millimeter";
@kilogram_force_per_square_centimeter: 9.806_65_E4; "kgf/cm²",
"kilogram-force per square centimeter", "kilograms-force per square centimeter";
@kilogram_force_per_square_meter: 9.806_65_E0; "kgf/m²",
Expand Down Expand Up @@ -132,6 +134,7 @@ mod tests {
test::<f::yoctonewton, a::square_meter, p::yoctopascal>();

test::<f::dyne, a::square_centimeter, p::dyne_per_square_centimeter>();
test::<f::newton, a::square_millimeter, p::newton_per_square_millimeter>();
test::<f::kilogram_force, a::square_millimeter, p::kilogram_force_per_square_millimeter>();
test::<f::kilogram_force, a::square_centimeter, p::kilogram_force_per_square_centimeter>();
test::<f::kilogram_force, a::square_meter, p::kilogram_force_per_square_meter>();
Expand Down
5 changes: 5 additions & 0 deletions src/si/volume_rate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ quantity! {
@yoctoliter_per_second: prefix!(milli) * prefix!(yocto); "yL/s", "yoctoliter per second",
"yoctoliters per second";

@liter_per_minute: prefix!(milli) / 6.0_E1; "L/min", "liter per minute",
"liters per minute";

@acre_foot_per_second: 1.233_489_E3; "ac · ft/s", "acre-foot per second",
"acre-feet per second";
@barrel_per_second: 1.589_873_E-1; "bbl/s", "barrel per second", "barrels per second";
Expand Down Expand Up @@ -221,6 +224,8 @@ mod tests {
test::<v::zeptoliter, t::second, r::zeptoliter_per_second>();
test::<v::yoctoliter, t::second, r::yoctoliter_per_second>();

test::<v::liter, t::minute, r::liter_per_minute>();

test::<v::acre_foot, t::second, r::acre_foot_per_second>();
test::<v::barrel, t::second, r::barrel_per_second>();
test::<v::bushel, t::second, r::bushel_per_second>();
Expand Down

0 comments on commit aab4751

Please sign in to comment.