Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add example for Quantity #444

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docs/src/conversion.md
Original file line number Diff line number Diff line change
Expand Up @@ -299,3 +299,13 @@ For multiplication and division, note that powers-of-ten prefixes are significan
in unit cancellation. For instance, `mV/V` is not simplified, although `V/V` is.
Also, `N*m/J` is not simplified: there is currently no logic to decide
whether or not units on a dimensionless quantity seem "intentional" or not.

## Adding units to a real number
Untis can be easily added to a real number using the `Quantity` constructor. This may be useful when the value of a unit is not yet known.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Untis can be easily added to a real number using the `Quantity` constructor. This may be useful when the value of a unit is not yet known.
Units can be easily added to a real number using the `Quantity` constructor. This may be useful when the value of a unit is not yet known.


```jldoctest
julia> unknown_num = 5;

julia> Quantity(unknown_num,mm)
5 mm
```