Improve UIntToOH behavior on incorrect inputs; avoid log2Up
The old implementation failed to check for width <= -2, and did the wrong thing when -1 was explicitly passed. Splitting into two methods avoids the latter issue. log2Ceil's argument might be 1, so employ a max operator.
parent
17ee2b5a
Please register or sign in to comment