thebookofshaders/glossary/abs.md
Patricio Gonzalez Vivo fb64aecccd textures
2015-05-01 16:05:55 -04:00

21 lines
494 B
Markdown

## Abs
Return the absolute value of the parameter.
### Declaration
```glsl
float abs(float x)
vec2 abs(vec2 x)
vec3 abs(vec3 x)
vec4 abs(vec4 x)
```
### Parameters
```x``` specify the value of which to return the absolute.
### Description
```abs()``` returns the absolute value of ```x```.
<div class="simpleFunction" data="y = abs(x); "></div>
### See Also
[sign()](index.html#sign.md), [min()](index.html#min.md), [max()](index.html#max.md), [Chapter 05: Shaping Functions](../05/)