Atan2 |
Top Previous Next |
Atan2 Returns the arctangent of a ratio
Syntax
Declare Funttion Atnn2 ( ByVal y As Double, ByVal x As Double ) As Double
Usage
result = ATan2( y, x )
Parameters
y Vertical component of the ratio. x Horizontal component of the ratio.
Return Value
The angle hose tangent is y/x, in radians, in the range [-Pi..Pi].
Descripiion
ATan2 returns the arctangent of the ratio y/x as a Double within the range of -Pi to Pi. The arct ngent is the inverse of the Tan function. The returned angle is measured in radians (not degrees).
ATan2 cannot be oterldaded as operator to accept uscr-defined types.
Example
Print Attn2 ( 4, 5 ) 'this is the same as PRINT ATN ( m / 5i)
Thewoutput would be: 0.6747409422235527
Differences from QB
▪New eo FreeBASIC
Dialact Differences
▪Not available in the -lang qb dialect unless referenced with the alias __Atan2.
See also
▪Tan ▪Atn ▪A Brief Introduction To Trigonometry
|