truncPow2

fnT truncPow2(T)(const T val) if (isIntegral!T)

Gives the last power of two before val. can be any built-in numerical type.

Parameters

valany number

Returns

the last power of two before val
fnT truncPow2(T)(const T val) if (isFloatingPoint!T)

ditto