46 lines
76 KiB
Markdown
46 lines
76 KiB
Markdown
---
|
|
title: "atan"
|
|
excerpt: "Compute the arctangent of a number (in radians)."
|
|
layout: manual
|
|
---
|
|
|
|
Compute the arctangent of a number (in radians).
|
|
|
|
Consider using `atan2()` instead for the true inverse of tangent.
|
|
|
|
```js
|
|
atan(input: number): number
|
|
```
|
|
|
|
### Tags
|
|
|
|
* `math`
|
|
|
|
|
|
### Arguments
|
|
|
|
| Name | Type | Description | Required |
|
|
|----------|------|-------------|----------|
|
|
| `input` | [`number`](/docs/kcl/types/number) | The number to compute arctangent of. | Yes |
|
|
|
|
### Returns
|
|
|
|
[`number`](/docs/kcl/types/number)
|
|
|
|
|
|
### Examples
|
|
|
|
```js
|
|
sketch001 = startSketchOn(XZ)
|
|
|> startProfile(at = [0, 0])
|
|
|> angledLine(angle = units::toDegrees(atan(1.25)), length = 20)
|
|
|> yLine(endAbsolute = 0)
|
|
|> close()
|
|
|
|
extrude001 = extrude(sketch001, length = 5)
|
|
```
|
|
|
|

|
|
|
|
|