ceilpow2
Returns the smallest power of two greater than or equal to the input.
Read time 3 minutesLast updated 12 days ago
Definition
- Type: Method
- Namespace: Unity.Mathematics
- Assembly: UnityEngine.MathematicsModule
ceilpow2(int)
Returns the smallest power of two greater than or equal to the input.
public static int ceilpow2(int x)
Parameters
Input value.
Returns
Type | Description |
|---|---|
| int | The smallest power of two greater than or equal to the input. |
Remarks
Also known as nextpow2.
ceilpow2(int2)
Returns the result of a componentwise calculation of the smallest power of two greater than or equal to the input.
public static int2 ceilpow2(int2 x)
Parameters
Input value.
Returns
Type | Description |
|---|---|
| int2 | The componentwise smallest power of two greater than or equal to the input. |
Remarks
Also known as nextpow2.
ceilpow2(int3)
Returns the result of a componentwise calculation of the smallest power of two greater than or equal to the input.
public static int3 ceilpow2(int3 x)
Parameters
Input value.
Returns
Type | Description |
|---|---|
| int3 | The componentwise smallest power of two greater than or equal to the input. |
Remarks
Also known as nextpow2.
ceilpow2(int4)
Returns the result of a componentwise calculation of the smallest power of two greater than or equal to the input.
public static int4 ceilpow2(int4 x)
Parameters
Input value.
Returns
Type | Description |
|---|---|
| int4 | The componentwise smallest power of two greater than or equal to the input. |
Remarks
Also known as nextpow2.
ceilpow2(uint)
Returns the smallest power of two greater than or equal to the input.
public static uint ceilpow2(uint x)
Parameters
Input value.
Returns
Type | Description |
|---|---|
| uint | The smallest power of two greater than or equal to the input. |
Remarks
Also known as nextpow2.
ceilpow2(uint2)
Returns the result of a componentwise calculation of the smallest power of two greater than or equal to the input.
public static uint2 ceilpow2(uint2 x)
Parameters
Input value.
Returns
Type | Description |
|---|---|
| uint2 | The componentwise smallest power of two greater than or equal to the input. |
Remarks
Also known as nextpow2.
ceilpow2(uint3)
Returns the result of a componentwise calculation of the smallest power of two greater than or equal to the input.
public static uint3 ceilpow2(uint3 x)
Parameters
Input value.
Returns
Type | Description |
|---|---|
| uint3 | The componentwise smallest power of two greater than or equal to the input. |
Remarks
Also known as nextpow2.
ceilpow2(uint4)
Returns the result of a componentwise calculation of the smallest power of two greater than or equal to the input.
public static uint4 ceilpow2(uint4 x)
Parameters
Input value.
Returns
Type | Description |
|---|---|
| uint4 | The componentwise smallest power of two greater than or equal to the input. |
Remarks
Also known as nextpow2.
ceilpow2(long)
Returns the smallest power of two greater than or equal to the input.
public static long ceilpow2(long x)
Parameters
Input value.
Returns
Type | Description |
|---|---|
| long | The smallest power of two greater than or equal to the input. |
Remarks
Also known as nextpow2.
ceilpow2(ulong)
Returns the smallest power of two greater than or equal to the input.
public static ulong ceilpow2(ulong x)
Parameters
Input value.
Returns
Type | Description |
|---|---|
| ulong | The smallest power of two greater than or equal to the input. |
Remarks
Also known as nextpow2.