On 2010-11-01, at 16:45, Max Carlson wrote: > On 11/1/10 1:44 PM, P T Withington wrote: >> On 2010-11-01, at 16:23, Max Carlson wrote: >> >>>> I'd still like to see a separate flag, so you don't have to use `-0` to >>>> mean an 'inset glow', but I guess we might as well make use of the >>>> existence of -0. >>> >>> According to my tests, both '-0 == 0' and '-0 === 0' return true :( but I >>> don't think it really matters. >> >> True. The only way I know to tell the difference: >> >> js> 1/0 >> Infinity >> js> 1/(-0) >> -Infinity >> >> I guess you could do that, if the distance is 0, make a sub-test to decide >> if inner or outer glow is being requested. > > Good lord!
Well, in a more complete language you could ask the sign of the number. Javascript unfortunately only lets you ask for the exponent and mantissa. OTOH, the identities above are standard IEEE float math.
