Function isPowerOfTwo

  • returns true if the given value is a power of two

    Parameters

    • val: number

      number to test

    Returns boolean

    true if number is a power of two