Phaser API Documentation

  Version: 

Member of: Phaser.Math.Pow2

<static> IsSize(width, height)

Description:

Checks if the given width and height are a power of two. Useful for checking texture dimensions.

Parameters:

name type description
width number

The width.

height number

The height.

Returns:
Description:

true if width and height are a power of two, otherwise false.

Type:
  • boolean
Since: 3.0.0