Returns base 2 logarithm.

Note that result approximation is implementation-dependent. If result is to be used in bit masks, use Math.round() on it.

  • Returns the base 2 logarithm of a number.

    Parameters

    • x: number

      A numeric expression.

    Returns number