From 239eeeafcb81cfadc317ee74cffda5f66c38f41e Mon Sep 17 00:00:00 2001 From: Tyler Benster Date: Thu, 13 May 2021 14:36:47 -0700 Subject: [PATCH] Add example for Quantity --- docs/src/conversion.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/src/conversion.md b/docs/src/conversion.md index 84e59dc4..afaa99eb 100644 --- a/docs/src/conversion.md +++ b/docs/src/conversion.md @@ -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. + +```jldoctest +julia> unknown_num = 5; + +julia> Quantity(unknown_num,mm) +5 mm +```