diff --git a/docs/src/display.md b/docs/src/display.md index a1f016d8..7416216e 100644 --- a/docs/src/display.md +++ b/docs/src/display.md @@ -6,6 +6,20 @@ variable `UNITFUL_FANCY_EXPONENTS` to either `true` or `false` to force using or the exponents. You can also set the `:fancy_exponent` IO context property to either `true` or `false` to force using or not using the exponents. +## Specifying precision + +If you need to set precision of displayed value of your unitful quantity, you can use the +`round` function as follows: + +```julia +julia> d = 1.7438748921932u"mm" +1.7438748921932 mm + +julia> round(typeof(d), d; sigdigits=3) +1.74 mm +``` + + ```@docs Unitful.BracketStyle Unitful.abbr