Files
30-seconds-of-code/test/distance/distance.js
2018-08-02 13:49:33 +03:00

3 lines
94 B
JavaScript

const distance = (x0, y0, x1, y1) => Math.hypot(x1 - x0, y1 - y0);
module.exports = distance;