Skip to content

Commit e2d182a

Browse files
committed
Parentheses
1 parent 8144c2f commit e2d182a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ModelingToolkit.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ function Base.show(io::IO, z::Complex{<:Num})
8989
r, i = reim(z)
9090
compact = get(io, :compact, false)
9191
show(io, r)
92-
print(io, compact ? "+" : " + ")
92+
print(io, (compact ? "+" : " + ") * "(")
9393
show(io, i)
94-
print(io, "*im")
94+
print(io, ")*im")
9595
end
9696

9797
SymbolicUtils.simplify(n::Num; kw...) = Num(SymbolicUtils.simplify(value(n); kw...))

0 commit comments

Comments
 (0)