use-materials-density 0.0.1

Primitive material density helpers
Documentation
  • Coverage
  • 9.09%
    1 out of 11 items documented1 out of 8 items with examples
  • Size
  • Source code size: 5.65 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 380.08 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 3s Average build duration of successful builds.
  • all releases: 3s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-materials
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

Primitive material density helpers.

Initial calculations assume SI units unless otherwise documented.

Examples

use use_density::{Density, density, mass_from_density, volume_from_density};

let density_value = Density::new(1_000.0).unwrap();

assert_eq!(density_value.kg_per_m3(), 1_000.0);
assert_eq!(density(10.0, 0.5).unwrap(), 20.0);
assert_eq!(mass_from_density(1_000.0, 0.01).unwrap(), 10.0);
assert_eq!(volume_from_density(10.0, 1_000.0).unwrap(), 0.01);