Documentation
›
API Reference
›
Object
›
Math
Pow2
Lua
C++
This function rounds a value off to the nearest power of two number. For example, Pow2(254) will return 256.
Syntax
number
Pow2
(number f)
Parameters
f:
the input value.
Returns
Returns the nearest power of two number to the input value.