Will Boyd@codersblock.com19 JulyTIL: JavaScript (basically) has a built-in coordinate distance function. const distance = Math.hypot(x2 - x1, y2 - y1) Also works for 3+ dimensions (just add more params).1
Joni Korpi@jonikorpi.com19 JulyIt's slower than the sqrt equivalent though! Made the mistake of using it for quite a while before finding out.12