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

$acos returns the arccosine of N.


Synopsis[edit]

$acos(N)[.deg]

Parameters[edit]

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

Properties[edit]

.degReturns the angle as degrees, default is radians.

Example[edit]

//echo -a $acos(5)
; returns $null because cosine can only be in range of -1.0 through +1.0
//echo -a In right triangle where opposite side is 4 and hypotenuse is 5, angle is $acos( $calc(4/5) ).deg degrees
; Returns: In right triangle where opposite side is 4 and hypotenuse is 5, angle is 36.869898 degrees
//var %i 60 | echo -a %i degrees / cosine $cos(%i).deg / acos $acos( $cos(%i).deg ).deg
//var %i 45 | echo -a %i degrees / cosine $cos(%i).deg / acos $acos( $cos(%i).deg ).deg
; returns 44.999982 instead of 45 because the $cos fraction is limited to 6 places
//var %i 270 | echo -a %i degrees / cosine $cos(%i).deg / acos $acos( $cos(%i).deg ).deg
; returns angle in the range of 0-180 degrees (0-pi radians)

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