Skip to content

Commit

Permalink
Keep original implementation
Browse files Browse the repository at this point in the history
Add link to Wikipedia
  • Loading branch information
christiankral committed Jun 10, 2022
1 parent e048cff commit 7cd0a8f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Modelica/Blocks/Math.mo
Original file line number Diff line number Diff line change
Expand Up @@ -3230,4 +3230,4 @@ connected with continuous blocks or with sampled-data blocks.
57.5,-63.9},{63.9,-49.2},{72,-26.8},{80,-2}},
color={95,95,95},
smooth=Smooth.Bezier)}));
end Math;
end Math;
13 changes: 5 additions & 8 deletions Modelica/Math/wrapAngle.mo
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
within Modelica.Math;
function wrapAngle "Wrap angle to interval [-pi,pi] or [0,2*pi]"
function wrapAngle "Wrap angle to interval ]-pi,pi] or [0,2*pi["
extends Modelica.Math.Icons.AxisCenter;
import Modelica.Constants.pi;
input Modelica.Units.SI.Angle u "Input angle";
Expand All @@ -20,10 +20,7 @@ algorithm
fillColor={192,192,192},
fillPattern=FillPattern.Solid),
Line(points={{-80,54},{-80,54},{-60,80},{-60,-80},{60,80},{60,-80},{80,-52}})}),
Documentation(info="<html>
<p>
This function wraps the input angle <code>u</code> to the interval [-pi,pi], if <code>positiveRange == false</code>.
Otherwise the input angle <code>u</code> is wrapped to the interval [0,2*pi].
</p>
</html>"));
end wrapAngle;
Documentation(info= "<html><head></head><body><p>
This function wraps the input angle <code>u</code> to the <a href=\"https://en.wikipedia.org/wiki/Interval_(mathematics)#Notations_for_intervals\">interval</a> ]-pi,pi], if <code>positiveRange == false</code>.
Otherwise the input angle <code>u</code> is wrapped to the <a href=\"https://en.wikipedia.org/wiki/Interval_(mathematics)#Notations_for_intervals\">interval</a> [0,2*pi[.</p></body></html>"));
end wrapAngle;

0 comments on commit 7cd0a8f

Please sign in to comment.