carb::math::bitScanReverse

Defined in carb/math/Util.h

template<class T>
int carb::math::bitScanReverse(const T &val)

Searches an integer value from most significant bit to least significant bit for the first set (1) bit.

Parameters

val[in] The integer value

Returns

One plus the bit position of the first set bit, or zero if val is zero.