A library for unit and quantity consistent computations in Rust
Project description
Unitforge
Overview
Unitforge is a Rust crate designed for safe handling of physical quantities of units. New quantities and relations can be set up via small macros.
Features
- Quantity inference: Resulting quantities of arithmetic operations are inferred at compile time.
- Unit conversion: Quantities can be set or read in arbitrary units.
- Computing Precision Values are stored in exponential format (f64*10^i32) to prevent floating point precision issues.
- Formating Quantities are displayed with 4 significant digits and configured display unit.
- ndarray support: Quantities may be used as inner types for
ndarray. - 3D Vector and matrix operations: Structs for 3D vectors and matrices are included to allow fast and unit-safe work with them.
- Serialization: Optional support for sere using the serde feature.
- python interface Optional Python interface when building with flag pyo3; also available on pypi
Contribute
All contributions are welcome! Feel free to implement new quantities or define relations using impl_macros.rs. 🚀
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file unitforge-0.2.9.tar.gz.
File metadata
- Download URL: unitforge-0.2.9.tar.gz
- Upload date:
- Size: 37.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f1de7ccbc89f6f495aa3568ceb24163b91beef78c7d7be423f1c6ae4eee250ee
|
|
| MD5 |
160e31b217f2e0acd402bc8acbe20cad
|
|
| BLAKE2b-256 |
09920d455d3995512daa2f7b80e7d4f2c8a46eed2bb98ec060ffc88dccb42802
|
File details
Details for the file unitforge-0.2.9-cp312-cp312-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: unitforge-0.2.9-cp312-cp312-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 527.8 kB
- Tags: CPython 3.12, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6209d1d50b516968e35595b9932b2cc3fc634436131063c2f3ec6e6ecb06597b
|
|
| MD5 |
4a282bb2701f003bd7455312812c42cf
|
|
| BLAKE2b-256 |
80ca4114b5d40dabf04efc65b5f85f4d85b05db555fcd976e8252f068a04e2f0
|