Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sostock/unitfulequivalences.jl
An extension of Unitful.jl for converting between equivalent quantities
https://github.com/sostock/unitfulequivalences.jl
julia unitful units units-of-measure
Last synced: 22 days ago
JSON representation
An extension of Unitful.jl for converting between equivalent quantities
- Host: GitHub
- URL: https://github.com/sostock/unitfulequivalences.jl
- Owner: sostock
- License: other
- Created: 2020-10-31T13:29:25.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-04-26T07:05:24.000Z (7 months ago)
- Last Synced: 2024-04-26T16:43:22.963Z (7 months ago)
- Topics: julia, unitful, units, units-of-measure
- Language: Julia
- Homepage:
- Size: 300 KB
- Stars: 5
- Watchers: 1
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# UnitfulEquivalences
[![PkgEval](https://juliaci.github.io/NanosoldierReports/pkgeval_badges/U/UnitfulEquivalences.svg)](https://juliaci.github.io/NanosoldierReports/pkgeval_badges/report.html)
[![CI](https://github.com/sostock/UnitfulEquivalences.jl/workflows/CI/badge.svg)](https://github.com/sostock/UnitfulEquivalences.jl/actions?query=workflow%3ACI)
[![codecov](https://codecov.io/gh/sostock/UnitfulEquivalences.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/sostock/UnitfulEquivalences.jl)[![](https://img.shields.io/badge/docs-stable-blue.svg)](https://sostock.github.io/UnitfulEquivalences.jl/stable)
[![](https://img.shields.io/badge/docs-dev-blue.svg)](https://sostock.github.io/UnitfulEquivalences.jl/dev)This package extends the [Unitful.jl](https://github.com/PainterQubits/Unitful.jl) package to enable conversion between quantities of different dimensions, related by an equivalence (e.g., conversion between mass and energy using the mass–energy equivalence *E* = *mc*²).
For its usage, see the [documentation](https://sostock.github.io/UnitfulEquivalences.jl/stable).## Installation
This package is compatible with Julia ≥ 1.0 and Unitful ≥ 1.0. It can be installed by typing
```
] add UnitfulEquivalences
```
in the Julia REPL.## Example usage
```julia
julia> using Unitful, UnitfulEquivalencesjulia> uconvert(u"keV", 1u"me", MassEnergy()) # electron rest mass equals ≈511 keV
510.9989499961642 keV
```