Version: 2021.3
언어: 한국어

Mathf.ClosestPowerOfTwo

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

설명

Returns the closest power of two value.

using UnityEngine;

public class Example : MonoBehaviour { void Start() { // prints 8 Debug.Log(Mathf.ClosestPowerOfTwo(7));

// prints 16 Debug.Log(Mathf.ClosestPowerOfTwo(19)); } }