vector_normalize
vector_normalize(result, data, [length])
Assuming the input is an N-dimension vector, normalizes the vector to magnitude of 1
Kind: global function
Param | Type | Description |
---|---|---|
result | Array.<number> | Float32Array | Float64Array | |
data | Array.<number> | Float32Array | Float64Array | |
[length] | number | number of dimensions |