use-hardness 0.0.1

Primitive hardness values and same-scale comparisons
Documentation
  • Coverage
  • 5.88%
    1 out of 17 items documented1 out of 9 items with examples
  • Size
  • Source code size: 4.78 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 429.82 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 hardness helpers.

Hardness values are only compared when they share the same scale. No approximate cross-scale conversions are provided in this first pass.

Examples

use use_hardness::{Hardness, HardnessScale, is_harder_than, same_scale};

let first = Hardness::new(200.0, HardnessScale::Vickers).unwrap();
let second = Hardness::new(180.0, HardnessScale::Vickers).unwrap();

assert!(same_scale(first, second));
assert!(is_harder_than(first, second).unwrap());