Nathan Wall wrote: > At the very least, I think Oliver has a point in that it'd be very > useful to have a sign function which would return 1 for +0 and -1 > for -0. I've needed this in the past. If it shouldn't be `Math.sign`, > perhaps there should be a `Number.sign` which would match the other > use-case (one that I think would be more useful for meta-programming > than what we have for `Math.sign`).
On the other hand, it would probably confuse a lot of novice programmers who aren't familiar with IEEE 754 if sign(0) returned 1. I could see that showing up in a list of JS WTFs. ;) Nathan _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

