* Fix various docs errors around std module Signed-off-by: Nick Cameron <nrc@ncameron.org> * remove KCL from lang docs titles and move settings docs Signed-off-by: Nick Cameron <nrc@ncameron.org> * Include functions declared in Rust in module docs Signed-off-by: Nick Cameron <nrc@ncameron.org> --------- Signed-off-by: Nick Cameron <nrc@ncameron.org>
45 lines
84 KiB
Markdown
45 lines
84 KiB
Markdown
---
|
|
title: "sqrt"
|
|
subtitle: "Function in std::math"
|
|
excerpt: "Compute the square root of a number."
|
|
layout: manual
|
|
---
|
|
|
|
Compute the square root of a number.
|
|
|
|
```kcl
|
|
sqrt(@input: number): number
|
|
```
|
|
|
|
|
|
|
|
### Arguments
|
|
|
|
| Name | Type | Description | Required |
|
|
|----------|------|-------------|----------|
|
|
| `input` | [`number`](/docs/kcl-std/types/std-types-number) | A number | Yes |
|
|
|
|
### Returns
|
|
|
|
[`number`](/docs/kcl-std/types/std-types-number) - A number
|
|
|
|
|
|
### Examples
|
|
|
|
```kcl
|
|
exampleSketch = startSketchOn(XZ)
|
|
|> startProfile(at = [0, 0])
|
|
|> angledLine(
|
|
angle = 50,
|
|
length = sqrt(2500),
|
|
)
|
|
|> yLine(endAbsolute = 0)
|
|
|> close()
|
|
|
|
example = extrude(exampleSketch, length = 5)
|
|
```
|
|
|
|

|
|
|
|
|