1
0
Fork 0

set: bugfix (invert test; still faster than the old version :-)

This commit is contained in:
mfranz 2008-10-22 23:27:03 +00:00
parent c0b2e1256e
commit 97c1ec0ac7

View file

@ -24,7 +24,7 @@ var test = func(n, b) {
# returns number <n> with bit <b> set
var set = func(n, b) n + test(n, b) * bit[b];
var set = func(n, b) n + !test(n, b) * bit[b];
# returns number <n> with bit <b> cleared