unit_vectorΒΆ

Transforms the input vector into a unit vector

\[\mathbf{\hat{v}} = \frac{\mathbf{v}}{\|\mathbf{v}\|}\]
param vector

vector to normalise

type vector

np.array

returns

unit vector

rtype

np.array