Skip to content

Commit f8b6e98

Browse files
committed
Improve cookie example
1 parent 5248189 commit f8b6e98

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/src/examples.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -317,13 +317,13 @@ We can then use this in a `Quantity`, and all operations will work as expected:
317317

318318
```julia
319319
x = Quantity(1.5, MyDimensions(cookie=1, milk=-1))
320-
y = Quantity(2.0, MyDimensions(cookie=1))
320+
y = Quantity(2.0, MyDimensions(milk=1))
321321

322322
x * y
323323
```
324324

325-
which gives us `3.0 cookie² milk⁻¹`. Likewise,
326-
we can use this in a `QuantityArray`:
325+
which gives us `3.0 cookie` computed from a rate of `1.5 cookie milk⁻¹` multiplied
326+
by `2.0 milk`. Likewise, we can use these in a `QuantityArray`:
327327

328328
```julia
329329
x_qa = QuantityArray(randn(32), MyDimensions(cookie=1, milk=-1))

0 commit comments

Comments
 (0)