Versions with this page:
Versions without this page:
Возвращает ближайшую степень двойки.
using UnityEngine; using System.Collections;public class ExampleClass : MonoBehaviour { void Example() { Debug.Log(Mathf.ClosestPowerOfTwo(7)); Debug.Log(Mathf.ClosestPowerOfTwo(19)); } }