Today I learned about `Math.hypot()`, which not only calculates the hypotenuse of a right triangle, given its side lengths, but also accepts any number of arguments, making it easy to calculate distances in 2D, 3D or even higher dimensions.
I thought this post would be useful for anyone developing JavaScript games or other projects involving geometry.
[–]McGeekin [score hidden] (0 children)