Skip to content

Commit 7f1997f

Browse files
committed
Improve docs
1 parent f89203d commit 7f1997f

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ julia> room_temp = 100kPa
8989
100000.0 m⁻¹ kg s⁻²
9090
```
9191

92+
Note that `Units` is an exported submodule, so you can
93+
also access this as `Units.kPa`.
94+
9295
This supports a wide range of SI base and derived units, with common
9396
prefixes.
9497

@@ -176,6 +179,12 @@ julia> u"Constants.c * Hz"
176179
2.99792458e8 m s⁻²
177180
```
178181

182+
Similarly, you can just import these:
183+
184+
```julia
185+
julia> using DynamicQuantities.Constants: c
186+
```
187+
179188
For the full list, see the [docs](https://symbolicml.org/DynamicQuantities.jl/dev/constants/).
180189

181190

@@ -220,6 +229,23 @@ julia> uconvert(us"nm", 5e-9u"m") # can also write 5e-9u"m" |> uconvert(us"nm")
220229
5.0 nm
221230
```
222231

232+
Finally, you can also import these directly:
233+
234+
```julia
235+
julia> using DynamicQuantities.SymbolicUnits: cm
236+
```
237+
238+
or constants:
239+
240+
```julia
241+
julia> using DynamicQuantities.SymbolicConstants: h
242+
```
243+
244+
Note that `SymbolicUnits` and `SymbolicConstants` are exported,
245+
so you can simply access these as `SymbolicUnits.cm` and `SymbolicConstants.h`,
246+
respectively.
247+
248+
223249
### Arrays
224250

225251
For working with an array of quantities that have the same dimensions,

0 commit comments

Comments
 (0)