Promotic

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 the pi/180 value. To convert radians to degrees, multiply radians by the 180/pi value.
Atn is the inverse trigonometric function of Tan, which takes an angle as its parameter 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).
Example1:
VBScriptSelect and copy to clipboard

Dim pi
pi = 4 * Atn(1)   ' Computing 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.27 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.