2015-04-17 04:52:51 +00:00
|
|
|
## Sqrt
|
|
|
|
Return the square root of the parameter
|
|
|
|
|
2015-04-18 14:41:34 +00:00
|
|
|
### Declaration
|
2015-04-17 04:52:51 +00:00
|
|
|
```glsl
|
|
|
|
float sqrt(float x)
|
|
|
|
vec2 sqrt(vec2 x)
|
|
|
|
vec3 sqrt(vec3 x)
|
|
|
|
vec4 sqrt(vec4 x)
|
|
|
|
```
|
|
|
|
|
|
|
|
### Parameters
|
2015-04-18 14:41:34 +00:00
|
|
|
```x``` specify the value of which to take the square root.
|
2015-04-17 04:52:51 +00:00
|
|
|
|
|
|
|
### Description
|
|
|
|
```sqrt()``` returns the square root of ```x```.
|
|
|
|
|
|
|
|
<div class="simpleFunction" data="y = sqrt(x); "></div>
|
|
|
|
|
2015-04-18 14:41:34 +00:00
|
|
|
<div class="codeAndCanvas" data="../07/circle-making.frag"></div>
|
|
|
|
|
2015-04-17 04:52:51 +00:00
|
|
|
### See Also
|
2016-04-06 15:44:45 +00:00
|
|
|
[inversesqrt](/glossary/?search=inversesqrt), [pow](/glossary/?search=pow), [Chapter 05: Shaping Functions](/05/)
|