---
title: "tan"
description: "The tangent of an angle in radians."
group: "space"
groupTitle: "Shapes, frames & warps"
categoryId: "math"
categorySlug: "math"
categoryTitle: "Math"
kind: "function"
sourceUrl: "https://github.com/shader-effects-inc/shaders/blob/main/packages/core/src/std/math.ts#L216"
---

# tan

The tangent of an angle in radians.

```ts
tan(x: Val): Expr
```

Import `math` from `shaders/std` and use `math.tan`.

## Parameters

| Name | Type | Notes |
|---|---|---|
| `x` | `Val` |  |

## Example

```ts
const slope = tan(mul(params.uniforms.tilt, 0.017453292519943295))
```

## See also

- [`sin`](/docs/primitives/math/sin) — The sine of an angle in radians, −1..1.
- [`cos`](/docs/primitives/math/cos) — The cosine of an angle in radians, −1..1.
- [`atan2`](/docs/primitives/math/atan2) — The angle of the point (x, y) in radians, −π..π.