Skip to content

Commit 37de814

Browse files
committed
Describe Float64 conversion explicitly
1 parent 7f93c4c commit 37de814

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/units.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ const bar = 100 * kPa
123123
uparse(s::AbstractString)
124124
125125
Parse a string containing an expression of units and return the
126-
corresponding `Quantity` object. For example, `uparse("m/s")`
127-
would be parsed to `Quantity(1.0, length=1, time=-1)`.
126+
corresponding `Quantity` object with `Float64` value. For example,
127+
`uparse("m/s")` would be parsed to `Quantity(1.0, length=1, time=-1)`.
128128
"""
129129
function uparse(s::AbstractString)
130130
return as_quantity(eval(Meta.parse(s)))::Quantity{DEFAULT_VALUE_TYPE,DEFAULT_DIM_TYPE}
@@ -138,8 +138,8 @@ as_quantity(x) = error("Unexpected type evaluated: $(typeof(x))")
138138
u"[unit expression]"
139139
140140
Parse a string containing an expression of units and return the
141-
corresponding `Quantity` object. For example, `u"km/s^2"`
142-
would be parsed to `Quantity(1000.0, length=1, time=-2)`.
141+
corresponding `Quantity` object with `Float64` value. For example,
142+
`u"km/s^2"` would be parsed to `Quantity(1000.0, length=1, time=-2)`.
143143
"""
144144
macro u_str(s)
145145
return esc(uparse(s))

0 commit comments

Comments
 (0)