NextPowerOfTwo
7/14/25Less than 1 minute
Mathf.NextPowerOfTwo(number value)
Returns the next power of two that is equal to, or greater than, the argument.
Parameters:
| Name | Type | Description |
|---|---|---|
| value | number | value |
Returns:
| type | Description |
|---|---|
| number | the next power of two that is equal to, or greater than, the argument. |
Usage
---@type number
local value;
local val0 = Mathf:NextPowerOfTwo(value)
