Mathf.NextPowerOfTwo

static function NextPowerOfTwo (value : int) : int

Description

Returns the next power of two value

JavaScript
// prints 8
Debug.Log(Mathf.NextPowerOfTwo(7));

// prints 256
Debug.Log(Mathf.NextPowerOfTwo(139));