ID : 228
Atn2
Function
To return arctangent obtained by subtracting x from y.
Syntax
Atn2(y, x)
Guaranteed entry
- y
- Designate Double Precision Real Number Type data.
- x
- Designate Double Precision Real Number Type data.
Return value
Return Double Precision Real Number Type data between -180 and +180. The unit is [Degree].
Description
Arctangent obtained by subtracting x from y is returned.
An error occurs when both x and y are 0.
Attention
The return value unit is [Degree].
Example
'!TITLE "Calculation of Arctangent 2"
' Calculation of arctangent obtained by subtracting 2 (the second argument) from 2 (the first
argument)
Sub Sample_ATn2
Dim aaa As Integer
' Assign the arctangent value of (2, 2) to aaa
aaa = ATn2( 2, 2 )
' Display "45" on the message output window
PrintDbg aaa
End Sub
ID : 228