https://github.com/cemoktra/rsi
Rust SI units package
https://github.com/cemoktra/rsi
rust si-units units
Last synced: over 1 year ago
JSON representation
Rust SI units package
- Host: GitHub
- URL: https://github.com/cemoktra/rsi
- Owner: cemoktra
- License: gpl-3.0
- Created: 2019-08-04T07:16:53.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-12-20T09:03:07.000Z (over 6 years ago)
- Last Synced: 2025-02-12T14:29:51.078Z (over 1 year ago)
- Topics: rust, si-units, units
- Language: Rust
- Size: 49.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/cemoktra/rsi/actions)
# rsi
SI units for rust. This is started as a sandbox project to learn rust.
# usage
```rust
let m = Value::new(LengthUnit::Meter, 6.0);
let s = Value::new(TimeUnit::Seconds, 2.0);
let v = m / s; // v is meter per second
assert_eq!(3.0, v.value());
assert_eq!("3m/s", v.to_string());
```