thebookofshaders/glossary/normalize
2016-04-06 11:44:45 -04:00
..
README.md folder structure for glossary 2016-04-06 11:44:45 -04:00

Normalize

Calculate the normalize product of two vectors

Declaration

float normalize(float x)  
vec2 normalize(vec2 x)  
vec3 normalize(vec3 x)  
vec4 normalize(vec4 x)

Parameters

v specifies the vector to normalize.

Description

normalize() returns a vector with the same direction as its parameter, v, but with length 1.

See Also

length()