IsPowerOfTwo
7/14/25Less than 1 minute
Mathf.IsPowerOfTwo(number value)
Returns true if the value is power of two.
Parameters:
Name | Type | Description |
---|---|---|
value | number | value |
Returns:
type | Description |
---|---|
boolean | true if the value is power of two. |
Usage
---@type number
local value;
local val0 = Mathf:IsPowerOfTwo(value)