Math387::LargestExp2 Function

int LargestExp2(int n);

Returns first number being power of two that is equal or greater than n.

#NameTypeDescription
1nint

Returns: the first number being power of two that is equal or greater than n.

Remarks:

It is much faster than the call of:

Exp2(Ceil(Log2(n)))

See Also: Math387::LargestLog2
Declared in Dew::Math::Units::Math387 · Dew.Math/Units.Math387.h · Cross-compiler