From WikiChip
$atan2 Identifier - mIRC
Commands & Identifiers
Basics
Events
Matching Tools
Data Storage
Control Structures
GUI Scripting
Sockets
Advanced Scripting
Additional Resources
Security
Other
$atan2 returns the arctangent of the 2 short sides of a right triangle.
Synopsis[edit]
$atan2(<O>,<A>)[.deg]
Parameters[edit]
OThe length of the Opposite side of the right triangle.
AThe length of the Adjacent side of the right triangle.
Properties[edit]
.degReturns the angle as degrees, default is radians.
Example[edit]
//var %opposite 3, %adjacent 4 | echo -a In right triangle where opposite side is length %opposite and adjacent side is length %adjacent - angle is $atan2( %opposite , %adjacent ).deg degrees ; Returns: In right triangle where opposite side is length 3 and adjacent side is length 4 - angle is 36.869898 degrees
//var %opposite 4 | var %adjacent 3 | echo -a except for rounding $atan2(%opposite,%adjacent).deg is the same as $atan( $calc( %opposite / %adjacent ) ).deg ; ATAN2 accepts the side lengths while ATAN accepts the tangent ratio of those sides
Compatibility[edit]
Added: mIRC v7.33
Added on: 27 May 2014
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.