feat: scaffold Svelte app with shared types and scale calculation

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
immortaly007andClaude Opus 5.5 committed 2026-10-15 14:38:22 +02:00
1 parent 4284f2533b
commit a39122c504
12 files changed
+1491

No files matched your search

+7
View File
@@ -0,0 +1,7 @@
import type { Point } from './types';
export function scaleFromLine(a: Point, b: Point, lengthMm: number): number | null {
const lengthPx = Math.hypot(b.x - a.x, b.y - a.y);
if (!(lengthMm > 0) || lengthPx < 1) return null;
return lengthPx / lengthMm;
}