dd05ee3a65
Co-authored-by: Eric Nemchik <eric@nemchik.com> Co-authored-by: Pavel Djundik <xPaw@users.noreply.github.com>
6 lines
142 B
TypeScript
6 lines
142 B
TypeScript
function distance([x1, y1]: [number, number], [x2, y2]: [number, number]) {
|
|
return Math.hypot(x1 - x2, y1 - y2);
|
|
}
|
|
|
|
export default distance;
|