Skip to content

Commit 5ff5e70

Browse files
committed
Improve readme
1 parent 133445e commit 5ff5e70

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Note that `Units` is an exported submodule, so you can
9393
also access this as `Units.kPa`. You may like to define
9494

9595
```julia
96-
julia> const U = Units; const C = Constants;
96+
julia> const U = Units
9797
```
9898

9999
so that you can simply write, say, `U.kPa` or `C.m_e`.
@@ -178,17 +178,23 @@ julia> Constants.c
178178
2.99792458e8 m s⁻¹
179179
```
180180

181+
which you may like to define as
182+
183+
```julia
184+
julia> const C = Constants
185+
```
186+
181187
These can also be used inside the `u"..."` macro:
182188

183189
```julia
184190
julia> u"Constants.c * Hz"
185191
2.99792458e8 m s⁻²
186192
```
187193

188-
Similarly, you can just import these:
194+
Similarly, you can just import each individual constant:
189195

190196
```julia
191-
julia> using DynamicQuantities.Constants: c
197+
julia> using DynamicQuantities.Constants: h
192198
```
193199

194200
For the full list, see the [docs](https://symbolicml.org/DynamicQuantities.jl/dev/constants/).

0 commit comments

Comments
 (0)