Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kolaru/trackedunits.jl
https://github.com/kolaru/trackedunits.jl
Last synced: 24 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/kolaru/trackedunits.jl
- Owner: Kolaru
- Created: 2021-06-06T14:49:17.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-08-26T15:43:47.000Z (over 3 years ago)
- Last Synced: 2024-10-23T06:58:05.175Z (2 months ago)
- Language: Julia
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# TrackedUnits.jl
This package offer some convenient function to strip quantities from their units while still storing the units for future use. It allows to work with pure number without losing units information.
## Usage
```julia
julia> using TrackedUnitsjulia> using Unitful
julia> @track_units x = 2u"m"
2julia> @track_units dt = 12.3u"fs"
12.3julia> @track_units v = x/dt
0.16260162601626016julia> v
0.16260162601626016julia> @get_units v
m fs^-1julia> tracked_variables()
Dict{Symbol, Any} with 3 entries:
:v => m fs^-1
:dt => fs
:x => m
```