Method

# Tan

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

## Description

Returns the tangent of the angle specified.

## Usage

``` xojo
result = Tan(value)
```

| Part   | Type                             | Description                                     |
|--------|----------------------------------|-------------------------------------------------|
| result | `Double</api/data_types/double>` | The tangent of *value*.                         |
| value  | `Double</api/data_types/double>` | The value (in radians) you want the tangent of. |

## Notes

The <span class="title-ref">Tan</span> function returns the tangent of the angle (in radians) passed to it. If the angle is in degrees, multiply it by PI/180 to convert it to radians.

## Sample code

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

``` xojo
Var d As Double
Const kPi = 3.14159265
d = Tan(45 * kPi / 180) ' returns 1.0
```

## Compatibility

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

<div class="seealso">

`Atan</api/math/atan>` function.

</div>
