3 ms·
Another caveat: for negative numbers, the bit-or rounds to zero while the floor rounds to negative infinity: > -0.5 -0.5 > (-0.5)|0 0 > M
by sheetjs 12y ago
Another caveat: for negative numbers, the bit-or rounds to zero while the floor rounds to negative infinity:
> -0.5
-0.5
> (-0.5)|0
0
> Math.floor(-0.5)
-1
- al2o3cr 12y agoA fine example why this sort of "who needs the specs, FULL SPEED AHEAD" hyper-optimization can get people into trouble.