static function ClosestPowerOfTwo (value : int) : int
Description描述
Returns the closest power of two value.
返回距离value最近的2的次方数。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
public void Awake() {
Debug.Log(Mathf.ClosestPowerOfTwo(7));
Debug.Log(Mathf.ClosestPowerOfTwo(19));
}
}