Returns the next power of two value
// prints 8Debug.Log(Mathf.NextPowerOfTwo(7));// prints 256Debug.Log(Mathf.NextPowerOfTwo(139));
using UnityEngine;using System.Collections;public class example : MonoBehaviour { void Example() { Debug.Log(Mathf.NextPowerOfTwo(7)); Debug.Log(Mathf.NextPowerOfTwo(139)); }}
import UnityEngineimport System.Collectionsclass example(MonoBehaviour): def Example(): Debug.Log(Mathf.NextPowerOfTwo(7)) Debug.Log(Mathf.NextPowerOfTwo(139))