6 lines
106 B
JavaScript
6 lines
106 B
JavaScript
|
function distance([x1, y1], [x2, y2]) {
|
||
|
return Math.hypot(x1 - x2, y1 - y2);
|
||
|
}
|
||
|
|
||
|
export default distance;
|