Version: 5.6

Mathf.ClosestPowerOfTwo

매뉴얼로 전환
public static int ClosestPowerOfTwo (int value);

설명

Returns the closest power of two value.

using UnityEngine;
using System.Collections;

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