distance_point2point
- nrv.utils.distance_point2point(x_1, y_1, x_2=0, y_2=0)[source]
Computes the distance between a point (x_p,y_p) and a line defined as y=a*x+b
- Parameters:
x_1 (float) – first point x coordinate,
y_1 (float) – firstpoint y coordinate,
x_2 (float) – second point x coordinate, by default 0
y_2 (float) – second point y coordinate, , by default 0
- Returns:
d – distance between the point and the orthogonal projection of (x_p,y_p) on it
- Return type:
float