Restore point.ts

Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
This commit is contained in:
Mark Tolmacs 2025-05-01 09:48:00 +02:00
parent 8d5de7854e
commit 948f4bdb35
No known key found for this signature in database

View file

@ -91,10 +91,9 @@ export function isPoint(p: unknown): p is LocalPoint | GlobalPoint {
export function pointsEqual<Point extends GlobalPoint | LocalPoint>(
a: Point,
b: Point,
threshold: number = PRECISION,
): boolean {
const abs = Math.abs;
return abs(a[0] - b[0]) < threshold && abs(a[1] - b[1]) < threshold;
return abs(a[0] - b[0]) < PRECISION && abs(a[1] - b[1]) < PRECISION;
}
/**