C'mon Mr Speaker, stop re-writing your "distance" function every project... Math.hypot() has been around for ages now!
Math.hypot(1,1); // 1.4142135623730951
(So has Math.SQRT2. I also forgot I already remembered and re-forgot that)
C'mon Mr Speaker, stop re-writing your "distance" function every project... Math.hypot() has been around for ages now!
Math.hypot(1,1); // 1.4142135623730951
(So has Math.SQRT2. I also forgot I already remembered and re-forgot that)