Function isPowerOfTwo

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

    Parameters

    • val: number

    Returns boolean

    Math