* updating kcl examples * generate images Signed-off-by: Jess Frazelle <github@jessfraz.com> * add new Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com> Co-authored-by: Jess Frazelle <github@jessfraz.com>
43 lines
161 KiB
Markdown
43 lines
161 KiB
Markdown
---
|
|
title: "sqrt"
|
|
excerpt: "Computes the square root of a number."
|
|
layout: manual
|
|
---
|
|
|
|
Computes the square root of a number.
|
|
|
|
|
|
|
|
```js
|
|
sqrt(num: number) -> number
|
|
```
|
|
|
|
### Tags
|
|
|
|
* `math`
|
|
|
|
### Examples
|
|
|
|
```js
|
|
const exampleSketch = startSketchOn("XZ")
|
|
|> startProfileAt([0, 0], %)
|
|
|> angledLine({ angle: 50, length: sqrt(2500) }, %)
|
|
|> yLineTo(0, %)
|
|
|> close(%)
|
|
|
|
const example = extrude(5, exampleSketch)
|
|
```
|
|
|
|

|
|
|
|
### Arguments
|
|
|
|
* `num`: `number` (REQUIRED)
|
|
|
|
### Returns
|
|
|
|
`number`
|
|
|
|
|
|
|