- Source: src/math/pow2/index.js (Line 7)
Methods
-
<static> GetNext(value)
-
Returns the nearest power of 2 to the given
value.Parameters:
Name Type Description valuenumber The value.
- Since: 3.0.0
- Source: src/math/pow2/GetPowerOfTwo.js (Line 7)
Returns:
The nearest power of 2 to
value.- Type
- number
-
<static> IsSize(width, height)
-
Checks if the given
widthandheightare a power of two. Useful for checking texture dimensions.Parameters:
Name Type Description widthnumber The width.
heightnumber The height.
- Since: 3.0.0
- Source: src/math/pow2/IsSizePowerOfTwo.js (Line 7)
Returns:
trueifwidthandheightare a power of two, otherwisefalse.- Type
- boolean
-
<static> IsValue(value)
-
Tests the value and returns
trueif it is a power of two.Parameters:
Name Type Description valuenumber The value to check if it's a power of two.
- Since: 3.0.0
- Source: src/math/pow2/IsValuePowerOfTwo.js (Line 7)
Returns:
Returns
trueifvalueis a power of two, otherwisefalse.- Type
- boolean
