functionatan3

Four quadrant inverse tangent (select solution that is 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 = atan3(u1,u2,y0) such that tan(y) = u1/u2 and y is in the range: -pi < y-y0 ≤ pi.
u2 may be zero, provided u1 is not zero. The difference to Modelica.Math.atan2(..) is the optional third argument y0 that allows to specify which of the infinite many solutions shall be returned:

Note, for the default case (y0=0), exactly the same result as with atan2(..) is returned.

Inputs

TypeNameDefaultDescription
Realu1First independent variable
Realu2Second independent variable
Modelica.Units.SI.Angley00y shall be in the range: -pi < y-y0 <= pi

Outputs

TypeNameDefaultDescription
Modelica.Units.SI.AngleyDependent variable y=atan3(u1, u2, y0)=atan(u1/u2)