mirror of
https://github.com/patriciogonzalezvivo/thebookofshaders
synced 2024-11-09 19:10:24 +00:00
24 lines
624 B
Markdown
24 lines
624 B
Markdown
## Pow
|
|
Return the value of the first parameter raised to the power of the second.
|
|
|
|
### Declaration
|
|
```glsl
|
|
float pow(float x, float y)
|
|
vec2 pow(vec2 x, vec2 y)
|
|
vec3 pow(vec3 x, vec3 y)
|
|
vec4 pow(vec4 x, vec4 y)
|
|
```
|
|
|
|
### Parameters
|
|
```x``` specify the value to raise to the power ```y```.
|
|
|
|
```y``` specify the power to which to raise ```x```.
|
|
|
|
### Description
|
|
```pow()``` returns the value of ```x``` raised to the ```y``` power.
|
|
|
|
<div class="simpleFunction" data="y = pow(x,3.0); "></div>
|
|
|
|
### See Also
|
|
|
|
[inversesqrt](/glossary/?search=inversesqrt), [sqrt](/glossary/?search=sqrt), [Chapter 05: Shaping Functions](/05/) |