Version: 5.5
public static int ClosestPowerOfTwo (int value);

説明

もっとも近い 2 のべき乗の値を返す。

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { void Example() { Debug.Log(Mathf.ClosestPowerOfTwo(7)); Debug.Log(Mathf.ClosestPowerOfTwo(19)); } }