diff options
| author | sam-anthony <samanthony6@protonmail.com> | 2022-01-26 06:37:29 -0330 |
|---|---|---|
| committer | sam-anthony <samanthony6@protonmail.com> | 2022-01-26 06:37:29 -0330 |
| commit | b45ddda0fda44ffb5e4ffbfe94b4d293b06d883e (patch) | |
| tree | b0167611d285da4302b575ae35f93ee4902eb3dd /src/lib.rs | |
| parent | eb55242f08fcd4a9a3fdcc8de1110999614c8813 (diff) | |
| download | volute-b45ddda0fda44ffb5e4ffbfe94b4d293b06d883e.zip | |
basic input handling
Diffstat (limited to 'src/lib.rs')
| -rw-r--r-- | src/lib.rs | 12 |
1 files changed, 4 insertions, 8 deletions
@@ -1,14 +1,10 @@ -pub mod flow_rate; -pub mod mass; -pub mod pressure; -pub mod temperature; -pub mod volume; +pub mod unit_of_measurement; -use crate::{pressure::Pressure, temperature::Temperature, volume::Volume}; +use crate::unit_of_measurement::{Pressure, Temperature, Volume}; const GAS_CONSTANT: f64 = 8.314472; const MOLAR_MASS_OF_AIR: f64 = 0.0289647; // Kg/mol -fn moles_from_gas_law(pressure: Pressure, volume: Volume, temperature: Temperature) -> f64 { - (pressure.as_pascals() * volume.as_cubic_metres()) / (GAS_CONSTANT * temperature.as_kelvin()) +fn moles_from_gas_law(pres: Pressure, vol: Volume, temp: Temperature) -> f64 { + (pres.as_pascals() * vol.as_cubic_metres()) / (GAS_CONSTANT * temp.as_kelvin()) } |