distance_point_point_sqrd_xy

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

Compute the squared distance between points a and b lying in the XY plane.

Parameters
  • a ([float, float] or [float, float, float] | Point) – XY(Z) coordinates of the first point.

  • b ([float, float] or [float, float, float] | Point) – XY(Z) coordinates of the second point.

Returns

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

Examples

>>> distance_point_point_sqrd_xy([0.0, 0.0], [2.0, 0.0])
4.0
>>> distance_point_point_sqrd_xy([0.0, 0.0, 0.0], [2.0, 0.0, 0.0])
4.0
>>> distance_point_point_sqrd_xy([0.0, 0.0, 1.0], [2.0, 0.0, 1.0])
4.0