use-magnitude 0.1.0

Primitive astronomical magnitude vocabulary for RustUse
Documentation
  • Coverage
  • 15%
    3 out of 20 items documented1 out of 10 items with examples
  • Size
  • Source code size: 8.55 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 625.59 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-astronomy
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-magnitude

Primitive astronomical magnitude vocabulary.

use-magnitude models validated magnitude values, descriptive magnitude kinds, and color index values. It does not calculate luminosity, calculate distances, perform photometric calibration, or fetch observation data.

use use_magnitude::{ColorIndex, Magnitude, MagnitudeKind};

let magnitude = Magnitude::new(-1.46).unwrap();
let color_index = ColorIndex::new(0.00).unwrap();

assert_eq!(magnitude.value(), -1.46);
assert_eq!(color_index.value(), 0.0);
assert_eq!(MagnitudeKind::Apparent.to_string(), "apparent");