what the hell was I thinking when I wrote this
This commit is contained in:
@ -191,7 +191,8 @@ end
|
||||
function ones(n)
|
||||
local ret = 0
|
||||
while n != 0 do
|
||||
ret += 1
|
||||
if (n&0x0.0001) ret += 1
|
||||
n >>= 1
|
||||
end
|
||||
return ret
|
||||
end
|
||||
|
Reference in New Issue
Block a user