def order_points(p1, p2, nd=3):
    """Given two points swap each axes where p1 > p2 

    Args:
      p1 (point): starting point
      p2 (point): ending point
      nd (int optional): number of axes to compare defaults to 3 ie x, y, z
    Returns:
      list: returns same points with axes ordered [[x,y,z], [x,y,z]]

    Links:
    Images:"""
    for i in range(0, nd):
        if p1[i] > p2[i]:
            t1 = p1[i]
            p1[i] = p2[i]
            p2[i] = t1
    return p1, p2
