Warcraft III resources & community, 2003–2006 · archived

DecodeInt

not rated
Submitted by AIAndyCalculations0 downloads
Decodes the bit with the number bit_num (starting with 0) from the integer bf.
That allows to use an integer as an array of booleans.

Source

function DecodeInt takes integer bf, integer bit_num returns boolean
  local integer l_bf = bf / R2I(Pow(2, bit_num))
  return (l_bf / 2) * 2 != l_bf
endfunction

Comments

0

No comments.