IsPowerOfTwo(int)
Returns true if the value is power of two.
읽는 시간 1분최근 업데이트: 한 달 전
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
public static bool IsPowerOfTwo(int value)
Parameters
Returns
Type | Description |
|---|---|
| bool |
Examples
using UnityEngine;public class Example : MonoBehaviour{ void Start() { // prints false Debug.Log(Mathf.IsPowerOfTwo(7)); // prints true Debug.Log(Mathf.IsPowerOfTwo(32)); }}