Atn2 (Tag-based PE function)
- Last UpdatedOct 04, 2024
- 1 minute read
- PI System
- PI Server 2018
- PI Server
Return the inverse tangent (arctan) of a tangent value a/b. The inverse tangent is the angle measured in radians from the positive x-axis to a line whose endpoints are the origin and the Cartesian coordinates (b, a).
Syntax
Atn2(x, y)
Arguments
x
An integer or real number
y
A non-zero integer or real number
Returns
The inverse tangent in radians of the tangent value x/y.
Exceptions
Returns an error if x or y is not an integer or real number.
Example
Atn2(1,2) [Returns 0.46365]
Atn2('att1', 'att2')
Atn2(TagVal('att1','y'), TagVal('att2', 'y'))