def distance(x1, x2):
    """Find distance between two points (made for use with numba)

    Parameters
    ----------
    x1 : float
      3D position of first point of the form [x,y,z]
    x2 : float
      3D position of first point of the form [x,y,z]

    Returns
    -------
    distance : float
      distance between the two points

    History
    -------
    2019 - Written - Webb (UofT)
    """
    dx = x2[0] - x1[0]
    dy = x2[1] - x1[1]
    dz = x2[2] - x1[2]

    r = (dx * dx + dy * dy + dz * dz) ** 0.5

    return r