Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
@ -213,7 +213,7 @@ export function pointDistance<P extends GenericPoint>(a: P, b: P): number {
* @returns The euclidean distance between the two points.
*/
export function pointDistanceSq<P extends GenericPoint>(a: P, b: P): number {
return Math.hypot(b[0] - a[0], b[1] - a[1]);
return Math.pow(b[0] - a[0], 2) + Math.pow(b[1] - a[1], 2);
}
/**