UtilNearestPowerOf2 Method |
Round the value up to the nearest power of two.
Namespace:
Demo3D.Common
Assembly:
Demo3D.Common (in Demo3D.Common.dll) Version: 15.0.2.11458
Syntaxpublic static int NearestPowerOf2(
int v
)
Parameters
- v
- Type: SystemInt32
Value to round up.
Return Value
Type:
Int32The nearest power of two greater than or equal to supplied value.
RemarksThe results only make real sense if the v is in the range [1, 1073741823].
See Also