physical-quantity

Crates.iophysical-quantity
lib.rsphysical-quantity
version0.0.5
sourcesrc
created_at2022-03-01 14:35:09.581109
updated_at2022-03-17 15:36:53.130565
descriptiondimension and unit system for general physical physical quantities.
homepagehttps://gitlab.com/fton/physical-quantity
repositoryhttps://gitlab.com/fton/physical-quantity
max_upload_size
id541589
size132,573
(fton)

documentation

README

Latest Release pipeline status coverage report

Description

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.

Usage

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);

Features

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.

Project status

This package is in the very early stage.

Commit count: 21

cargo fmt