Math.hypot(1)

Brendan Eich brendan at mozilla.com
Thu Aug 1 10:39:18 PDT 2013


Luke Hoban wrote:
> More discussion on this here: https://bugs.ecmascript.org/show_bug.cgi?id=309.  CC Roger Andrews who had argued there that this should be 2- and 3- arguments only.

Good stuff there. But I would appreciate more detail from Roger on the 
"(Otherwise we get into over-complicated issues with vector 2-norms, 
etc.)"issues cited in 
https://bugs.ecmascript.org/show_bug.cgi?id=309#c15 -- if it's not just 
about excessive rounding error mentioned earlier.

> Personally, I don't see a strong case against allowing hypot to be variadic from re-reading that discussion, and do believe that would be a more expected behavior for ECMAScript, as for example Waldemar's last comment below points out.

Agree, unless there's a footgun Roger sees that we should avoid arming 
users with.

/be


More information about the es-discuss mailing list