# Atn - function of language VBScript

###### Description:
Returns the arctangent of a number.
In the PROMOTIC system it is better to use the Pm.Atan method.
###### Syntax:
Double Atn(Double nValue)
###### Parameters:
nValue (Double) Any valid numeric expression.
###### Note:
The Atn function takes the ratio of two sides of a right triangle (number) and returns the corresponding angle in radians. The ratio is the length of the side opposite the angle divided by the length of the side adjacent to the angle. The result is in the range from -pi/2 to pi/2 radians.
To convert degrees to radians, multiply degrees by pi/180. To convert radians to degrees, multiply radians by 180/pi.
Atn is the inverse trigonometric function of Tan, which takes an angle as its argument and returns the ratio of two sides of a right triangle. Do not confuse Atn with the cotangent, which is the simple inverse of a tangent (cotangent=1/tangent).
- VBScript.Cos (function)
- VBScript.Sin (function)
- VBScript.Tan (function)
###### Example1:
VBScriptSelect and copy to clipboard
``` Dim pipi = 4 * Atn(1)   ' calculate the value of Pi```
###### Example2:
Computing of derived arcus functions
VBScriptSelect and copy to clipboard
``` Dim Arcsin, Arccos, Arcsec, Arccosec, Arccotan Arcsin = Atn(x / Sqr(-x * x + 1)) Arccos = Atn(-x / Sqr(-x * x + 1)) + 2 * Atn(1) Arcsec = Atn(x / Sqr(x * x - 1)) + Sgn(x - 1) * 2 * Atn(1) Arccosec = Atn(x / Sqr(x * x - 1)) + (Sgn(x) - 1) * 2 * Atn(1) Arccotan = Atn(x) + 2 + Atn(1)```
PROMOTIC 9.0.17 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person

- Abs
- And
- Asc
- Atn

- Cos
- Day
- Dim
- Eqv
- Exp
- Fix
- Hex
- Chr
- If
- Imp
- Int
- Is
- Len
- Log
- Mid
- Mod
- Not
- Now
- Oct
- Or
- Rem
- RGB
- Rnd
- Set
- Sgn
- Sin
- Sqr
- Tan
- Xor