NormalizeVector Function

Normalizes a vector. The input array can be the same as the output array.

float NormalizeVector(const float vec[3], float result[3])

Parameters

const float[3] vec

Vector.

float[3] result

Resultant vector.

Return Value

Vector length.