Expand description
Various distance types (Km, Mi, Au, Ly, Pc), temperature (K), mass (EarthMass), etc.
use msuk_scifi::unit::temperature::k::K for e.g. ’K’elvin.
use msuk_scifi::unit::distance::au::Au for e.g. ‘Au’ (astronomical unit).
Modules§
Macros§
- approx_
eq - Approx. equivalence with either default or specified epsilon.
- approx_
eq_ upto_ n_ decimals - As per approx_eq, but with an integer telling up to how many decimals we look for equality.
- dbz_
panic - define_
distance_ unit - Define a distance type.
- generate_
arith_ tests_ for_ distance - implement_
arith_ generics_ for_ distance - Implement various arithmetic functionality for the given distance type.
- implement_
arith_ generics_ for_ temperature - Implement various arithmetic functionality for the given temperature type.
- implement_
as_ for_ temperature - Implement
as_FOOBAR,as_rounded_FOOBAR, andtry_as_FOOBARfor (e.g.) a temperature type. - implement_
from_ for_ distance - Implement a
From<X>for the given$type. - implement_
from_ for_ temperature - Implement a number of
From<X>for the given type. - implement_
unit_ conversion - Unit converter core.