pyCGM_Single.pycgmStatic.getDist¶
- 
pyCGM_Single.pycgmStatic.getDist(p0, p1)¶ Get Distance function
This function calculates the distance between two 3-D positions.
- Parameters
 - p0array
 Position of first x, y, z coordinate.
- p1array
 Position of second x, y, z coordinate.
- Returns
 - float
 The distance between positions p0 and p1.
Examples
>>> import numpy as np >>> from .pycgmStatic import getDist >>> p0 = [0,1,2] >>> p1 = [1,2,3] >>> np.around(getDist(p0,p1), 2) 1.73 >>> p0 = np.array([991.45, 741.95, 321.36]) >>> p1 = np.array([117.09, 142.24, 481.95]) >>> np.around(getDist(p0,p1), 2) 1072.36