---
title: "tan"
canonical: "https://help.vicon.com/space/ShogunPost121/1253737400/tan"
format: markdown
---
# Description

The tan command is used to calculate the tangent for any input angle. The input units are in degrees.

Picture the unit circle (a circle of radius 1.0 centered about the origin). If you were to imagine a unit vector rotating inside of the unit circle, the angle (in degrees) that the unit vector makes with the positive x-axis is the input argument theta. The slope of the unit vector is the return value of the tan function.

## Functional area

Math

# Command syntax

## Syntax

> Macro (scroll-tablelayout)

|  |
| --- |
| `tan value` |

### Arguments

| Name | Type | Required | Comments |
| --- | --- | --- | --- |
| `value` | float | yes | Float value of an angle in degrees. |

### Flags

None

## Return value

float

Returns a floating point value. tan is undefined at {..., -270, -90, 90, 270, ...}

> Macro (scroll-pagebreak)

## Examples

```plaintext
float $temp = (tan (30)); 
// declares a variable for the tangent function
 
print (string ($temp)); 
// prints the output of the tangent function
```

# Additional information

## Related commands

- [acos](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253737439)
- [asin](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253737453)
- [atan](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253737193)
- [cos](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253736839)
- [sin](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253738349)