From WikiChip
$atan Identifier - mIRC
< mirc‎ | identifiers

$atan returns the arctangent of N.


Synopsis[edit]

$atan(N)[.deg]

Parameters[edit]

NThe tangent in radians for which you want the arc tangent.

Properties[edit]

.degReturns the angle as degrees, default is radians.

Example[edit]

//echo -a In right triangle where opposite side is 3 and adjacent is 4, angle is $atan( $calc(3/4) ).deg degrees 
; Returns: In right triangle where opposite side is 3 and adjacent is 4, angle is 36.869898 degrees
//var %i 60 | echo -a %i degrees / tangent $tan(%i).deg / atan $atan( $tan(%i).deg ).deg
; returns 60.000003 instead of 60 because the $tan fraction is limited to 6 places
//var %i 45 | echo -a %i degrees / tangent $tan(%i).deg / atan $atan( $tan(%i).deg ).deg
//var %i 240 | echo -a %i degrees / tangent $tan(%i).deg / atan $atan( $tan(%i).deg ).deg
; returns angle in the range of -90 - +90 degrees (-pi/2 - +pi/2 radians)
//var %i 90 | echo -a %i degrees / tangent $tan(%i).deg / atan $atan( $tan(%i).deg ).deg
; for 90 degrees, returns a VERY BIG NUMBER instead of infinity

Compatibility[edit]

Added: mIRC v5.3
Added on: 13 Dec 1997
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.


See also[edit]

[Expand]
v · d · e mIRC identifier list