46 lines
81 KiB
Markdown
46 lines
81 KiB
Markdown
---
|
|
title: "tan"
|
|
excerpt: "Compute the tangent of a number (in radians)."
|
|
layout: manual
|
|
---
|
|
|
|
Compute the tangent of a number (in radians).
|
|
|
|
|
|
|
|
```js
|
|
tan(num: number) -> number
|
|
```
|
|
|
|
### Tags
|
|
|
|
* `math`
|
|
|
|
|
|
### Arguments
|
|
|
|
| Name | Type | Description | Required |
|
|
|----------|------|-------------|----------|
|
|
| `num` | `number` | | Yes |
|
|
|
|
### Returns
|
|
|
|
`number`
|
|
|
|
|
|
### Examples
|
|
|
|
```js
|
|
exampleSketch = startSketchOn("XZ")
|
|
|> startProfileAt([0, 0], %)
|
|
|> angledLine({ angle = 50, length = 50 * tan(1 / 2) }, %)
|
|
|> yLineTo(0, %)
|
|
|> close(%)
|
|
|
|
example = extrude(5, exampleSketch)
|
|
```
|
|
|
|

|
|
|
|
|