quant 0.0.3

A library that makes it easy to work w/ Dimensions, Units, and Physical Quantities.
quant-0.0.3 has been yanked.

Quant

A library that makes it easy to work w/ Dimensions, Units, and Physical Quantities. It is currently a complete work in progress.

Example

Start by adding the following to your Cargo.toml file:

Crates

[dependencies]
quant = "*"

Then add the following to your main.rs file:

extern crate quant;

use quant::{kilogram, metre, second};

fn main() {
  let kilogram = kilogram();
  let distance = metre();
  let time = second();
  let interval = time.clone();

  println!("One newton (N) is the force needed to accelerate \
    {} of mass at the rate of {} per {} per {}.",
    kilogram, distance, time, interval);

  let speed = distance.per(time);
  let acceleration = speed.per(interval);
  let newton = kilogram * acceleration;

  println!("{}", newton.named()) // 1 newton
}

TODO

  • Documentation.
  • More tests.
  • named method for derived units.
  • Implement other unimplemented methods.
  • Parser.
  • Check uncertainty.
  • Trig. functions for rad.