distance_point_point_sqrd

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

Compute the squared distance bewteen points a and b.

Parameters
  • a (sequence of float) – XYZ coordinates of point a.

  • b (sequence of float) – XYZ coordinates of point b.

Returns

d2 (float) – Squared distance bewteen a and b.

Examples

>>> distance_point_point_sqrd([0.0, 0.0, 0.0], [2.0, 0.0, 0.0])
4.0