functionatan3
Four quadrant inverse tangent (with solution closest to given angle y0)
Extends from Modelica.Math.Icons.AxisCenter (Basic icon for mathematical function with y-axis in the center).
Information
This function returns y = atan2(u1, u2, y0), where y is an angle, such that tan(y) = u1/u2 and y is in the range -π rad < y - y0 ≤ π rad. u2 may be zero, provided u1 is not zero.
The difference from atan2() is the optional third argument y0 that specifies which of the infinite many solutions is returned. Note that for the default case (y0 = 0), the result is the same as from atan2().
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| Real | u1 | ||
| Real | u2 | ||
| Q.Angle | y0 | 0 | <html><i>y</i> shall be in the range: -π < <i>y</i> - <i>y</i><sub>0</sub> ≤ π</html> |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| Q.Angle | y |