thebookofshaders/glossary/normalize/README.md

21 lines
416 B
Markdown
Raw Normal View History

2015-04-18 14:41:34 +00:00
## Normalize
Calculate the normalize product of two vectors
### Declaration
```glsl
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
2017-08-19 10:11:58 +00:00
[length()](/glossary/?search=length)