Skip to content

Commit

Permalink
Use one character instead of line drawings.
Browse files Browse the repository at this point in the history
This is more consistent with the name of the operator,
and avoids graphical artifacts in some tools like Dymola.
(The new variant works with and without anti-aliasing, the old
one worked with neither.)
  • Loading branch information
HansOlsson authored and beutlich committed May 24, 2021
1 parent 1048d9c commit ecc0b41
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions Complex.mo
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,10 @@ operator record Complex "Complex number with overloaded operators"
lineColor={128,128,128},
extent={{-100,-100},{100,100}},
radius=25.0),
Line(
points={{-50,0},{50,0}})}));
Text(
extent={{-100,100},{100,-80}},
textColor={128,128,128},
textString="-")}));
end '-';

encapsulated operator '*' "Multiplication"
Expand Down Expand Up @@ -130,14 +132,10 @@ operator record Complex "Complex number with overloaded operators"
lineColor={128,128,128},
extent={{-100,-100},{100,100}},
radius=25.0),
Line(
points={{-42,36},{39,-34}}),
Line(
points={{-42,-35},{39,37}}),
Line(
points={{-55,1},{52,1}}),
Line(
points={{-1.5,55},{-2,-53}})}));
Text(
extent={{-100,46},{102,-100}},
textColor={128,128,128},
textString="*")}));
end '*';

encapsulated operator function '+' "Add two complex numbers"
Expand Down

0 comments on commit ecc0b41

Please sign in to comment.