distance_point_point_xy

compas.geometry.distance_point_point_xy(a, b)[source]

Compute the distance between points a and b, assuming they lie in the XY plane.

Parameters
  • a (sequence of float) – XY(Z) coordinates of a 2D or 3D point (Z will be ignored).

  • b (sequence of float) – XY(Z) coordinates of a 2D or 3D point (Z will be ignored).

Returns

float – Distance between a and b in the XY-plane.

Examples

>>> distance_point_point_xy([0.0, 0.0], [2.0, 0.0])
2.0
>>> distance_point_point_xy([0.0, 0.0, 0.0], [2.0, 0.0, 0.0])
2.0
>>> distance_point_point_xy([0.0, 0.0, 1.0], [2.0, 0.0, 1.0])
2.0