Skip to content

Commit 10792ae

Browse files
committed
Added support for "sign"
1 parent 0a99e55 commit 10792ae

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "FlexUnits"
22
uuid = "76e01b6b-c995-4ce6-8559-91e72a3d4e95"
33
authors = ["Ruben Gonzalez <[email protected]> and contributors"]
4-
version = "0.2.3"
4+
version = "0.2.4"
55

66
[compat]
77
julia = "1.10"

src/math.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,8 @@ for f in (:isfinite, :isinf, :isnan, :isreal, :isempty, :one)
178178
@eval Base.$f(q::AbstractQuantity) = $f(ustrip(q))
179179
end
180180

181-
#Single-argument functions with dimensionless output that don't work with non-scalar units
182-
for f in (:iszero, :signbit, :angle)
181+
#Single-argument functions with dimensionless output that only work with scalar units (no offset)
182+
for f in (:iszero, :angle, :signbit, :sign)
183183
@eval Base.$f(q::AbstractQuantity) = (assert_scalar(unit(q)); $f(ustrip_base(q)))
184184
end
185185

0 commit comments

Comments
 (0)