function
Planning.Dubins.wrapAngle
Wrap an angle to [-pi, pi]
Public declarations
Explicit source declarations; dimensions, modifications and defaults are shown as written, without evaluation.
| Role | Name | Type | Dimensions / attributes / default | Description |
|---|---|---|---|---|
| input | angle | Real | | |
| output | wrapped | Real | |
Modelica declarations and implementation
Show parameters, interfaces and source
Parameters, inputs, outputs, defaults and equations from the source file.
function wrapAngle "Wrap an angle to [-pi, pi]"
input Real angle;
output Real wrapped;
algorithm
wrapped := atan2(sin(angle), cos(angle));
end wrapAngle;