Versions with this page:
Versions without this page:
Devuelve el exponente más cercano de dos valores.
using UnityEngine;public class Example : MonoBehaviour { void Start() { // prints 8 Debug.Log(Mathf.ClosestPowerOfTwo(7)); // prints 16 Debug.Log(Mathf.ClosestPowerOfTwo(19)); } }