\$acos Identifier - mIRC
< mirc‎ | identifiers

Commands & Identifiers
Basics
Events
Matching Tools
Data Storage
Control Structures
GUI Scripting
Sockets
Security
Other
v · d · e

\$acos returns the arccosine of N.

## Synopsis

`\$acos(N)[.deg]`

## Parameters

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

## Properties

.degReturns the angle as degrees, default is radians.

## Example

```//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)```