# Integer

Provide functions for the manipulation of integers.

pyrr.integer.count_bits(value)

  Counts the number of bits set to 1 in an integer.

  For example:

      >>> count_bits(0b101111)
      5
      >>> count_bits(0xf)
      4
      >>> count_bits(8)
      1
      >>> count_bits(3)
      2

  Parameters:

    value (int) – An integer.

  Return type:

    integer

  Returns:

    The count of bits set to 1.

  See also

  http://wiki.python.org/moin/BitManipulation