Given sets of points P0, P1 (shape (n, 2)) describing lines and a set of
points P (shape (m, 2)), return the (m, n) distances from each point to each line.
Input
P0 =
[[0. 0.]
[0. 0.]]
P1 =
[[1. 0.]
[0. 1.]]
P =
[[1. 1.]
[2. 0.]]
Output
[[1. 1.]
[0. 2.]]