Crates.io | physical-quantity |
lib.rs | physical-quantity |
version | 0.0.5 |
source | src |
created_at | 2022-03-01 14:35:09.581109 |
updated_at | 2022-03-17 15:36:53.130565 |
description | dimension and unit system for general physical physical quantities. |
homepage | https://gitlab.com/fton/physical-quantity |
repository | https://gitlab.com/fton/physical-quantity |
max_upload_size | |
id | 541589 |
size | 132,573 |
Dimension and unit system for general physical quantities.
This package provids the implementations. For general use, unitage is convenient.
When you use this package only for restrict the argument for your function to paticular dimension, it may be prefer adding this package to the dependencies directly.
use ::physical_quantity::*;
let inch: Unit<f64, _> = "in.".parse().unwrap();
let pq = inch.pq(1f64);
let mm: Unit<f64, _> = "mm".parse().unwrap();
let inch2mm = mm.value(pq).unwrap();
assert_eq!(inch2mm, 25.4);
This package has the following feature flags. No feature flags are enabled by default.
full
Enables all features.default-units
Enables the default definitions of the units.
Enabling this flag enables parser
flag also.parser
Enables the unit string parser.ratio
Enables num_rational::BigRational supports.std
Enables std supports.This package is in the very early stage.