carb::math::bitScanForward

Defined in carb/math/Util.h

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

Searches an integer value from least signficiant bit to most 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.