Files
infocom-systems-design/node_modules/roughjs/bin/geometry.js
2025-10-03 22:27:28 +03:00

6 lines
164 B
JavaScript

export function lineLength(line) {
const p1 = line[0];
const p2 = line[1];
return Math.sqrt(Math.pow(p1[0] - p2[0], 2) + Math.pow(p1[1] - p2[1], 2));
}