Another half of actionFinalize on arrow endpoint drag

This commit is contained in:
Mark Tolmacs 2025-04-16 19:11:11 +02:00
parent 64fa1c6948
commit e51e72c676
No known key found for this signature in database
2 changed files with 25 additions and 9 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,
threshold: 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]) < threshold && abs(a[1] - b[1]) < threshold;
}
/**