pyCGM_Single.pycgmKinetics.unit

pyCGM_Single.pycgmKinetics.unit(v)

Calculate unit vector.

Parameters
vlist

A 3D vector.

Returns
tuple

Returns the unit vector of v.

Examples

>>> import numpy as np
>>> from .pycgmKinetics import unit
>>> v = [1,2,3]
>>> np.around(unit(v), 2)
array([0.27, 0.53, 0.8 ])