thebookofshaders/glossary/abs.md
Patricio Gonzalez Vivo 28f372e311 add glossary
2015-04-17 00:52:51 -04:00

378 B

Abs

Return the absolute value of the parameter

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.

See Also

sign