diff --git a/packages/math/point.ts b/packages/math/point.ts index e24bd29c3e..398eb9f849 100644 --- a/packages/math/point.ts +++ b/packages/math/point.ts @@ -213,7 +213,7 @@ export function pointDistance

(a: P, b: P): number { * @returns The euclidean distance between the two points. */ export function pointDistanceSq

(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); } /**