(width, height)
| 17 | * @return {boolean} `true` if `width` and `height` are a power of two, otherwise `false`. |
| 18 | */ |
| 19 | var IsSizePowerOfTwo = function (width, height) |
| 20 | { |
| 21 | return (width > 0 && (width & (width - 1)) === 0 && height > 0 && (height & (height - 1)) === 0); |
| 22 | }; |
| 23 | |
| 24 | module.exports = IsSizePowerOfTwo; |
no outgoing calls
no test coverage detected
searching dependent graphs…