thebookofshaders/glossary/sqrt.md

20 lines
420 B
Markdown
Raw Normal View History

2015-04-17 04:52:51 +00:00
## Sqrt
Return the square root of the parameter
```glsl
float sqrt(float x)
vec2 sqrt(vec2 x)
vec3 sqrt(vec3 x)
vec4 sqrt(vec4 x)
```
### Parameters
```x``` Specify the value of which to take the square root.
### Description
```sqrt()``` returns the square root of ```x```.
<div class="simpleFunction" data="y = sqrt(x); "></div>
### See Also
[inversesqrt](index.html#inversesqrt.md), [pow](index.html#pow.md)