comp_distance (method)

distance_numpy(A, B, P)[source]

segment line AB, point P, where each one is an array([x, y])

comp_distance(self, Z)[source]

Compute the distance of a point to the Segment

Parameters
  • self (Segment) – A Segment object

  • Z (complex) – Complex coordinate of the point

Returns

D – distance of a point to the Segment

Return type

float