distance2

fun distance2(p1: Point, p2: Point): Double

Squared distance between two points (faster, avoids sqrt).

Return

The squared Euclidean distance between p1 and p2.

Parameters

p1

The first point.

p2

The second point.