def distanceToLine(x0, x1, x2):
    numerator = np.sqrt(np.sum(np.cross((x0 - x1), (x0-x2))**2))
    denom = np.linalg.norm(x2-x1)
    return numerator / denom
dataset/ETHPy150Open RobotLocomotion/director/src/python/director/segmentation.py/distanceToLine/original