\$atan Identifier - mIRC
< mirc‎ | identifiers

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

\$atan returns the arctangent of N.

## Synopsis

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

## Parameters

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

## Properties

.degReturns the angle as degrees, default is radians.

## Example

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