Method

# ATan

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

## Description

Returns the [arctangent](http://en.wikipedia.org/wiki/Arctangent) of the value specified. The arctangent is the angle whose tangent is *value*.

## Usage

``` xojo
result = ATan(value)
```

| Part   | Type                             | Description                           |
|--------|----------------------------------|---------------------------------------|
| result | `Double</api/data_types/double>` | The arctangent of *value*.            |
| value  | `Double</api/data_types/double>` | The value you want the arctangent of. |

## Notes

The <span class="title-ref">ATan</span> function returns the angle (in radians) of the number passed to it. To express the arctangent in degrees, multiply the result by 180/PI.

## Sample code

This example uses the <span class="title-ref">ATan</span> function to return the arc tangent of a number.

``` xojo
Var d As Double
Const Pi = 3.14159265358979323846264338327950
d = ATan(1) ' returns 0.785398 (PI/4 radians)
d = ATan(1) * 180 / Pi ' returns 45
```

## Compatibility

|                       |     |
|-----------------------|-----|
| **Project Types**     | All |
| **Operating Systems** | All |

<div class="seealso">

`Atan2</api/math/atan2>`, `Tan</api/math/tan>` functions

</div>
