Remove very small arrows

This commit is contained in:
Mark Tolmacs 2025-05-01 13:38:54 +02:00
parent 25a2ec4b49
commit 4702509500
No known key found for this signature in database
2 changed files with 11 additions and 7 deletions

View file

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