ATAN¶
Returns the arc tangent (inverse tangent) of a numeric input.
Signature¶
┌─────────┐
IN ─┤ ATAN ├─ OUT
└─────────┘
FUNCTION ATAN : ANY_REAL
VAR_INPUT
IN : ANY_REAL;
END_VAR
END_FUNCTION
The return type matches the input type. ATAN accepts REAL,
LREAL.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
The numeric value to compute the arc tangent of. |
Outputs
Name |
Type |
Description |
|---|---|---|
Return value |
|
The arc tangent of IN in radians, in the range [-pi/2, pi/2]. Same type as IN. |
Description¶
Returns the arc tangent of IN in radians. The result is in the range [-pi/2, pi/2].
Example¶
result := ATAN(REAL#0.0); (* result = 0.0 *)
value := ATAN(LREAL#1.0); (* value ~ 0.7853982 *)
See Also¶
References¶
IEC 61131-3 §2.5.1.5.2