| 65 | } |
| 66 | |
| 67 | inline void eucDivMod(int a, int b, int* div, int* mod) { |
| 68 | *div = a / b; |
| 69 | *mod = a % b; |
| 70 | if (*mod < 0) { |
| 71 | *div -= 1; |
| 72 | *mod += b; |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | /** Returns `floor(log_2(n))`, or 0 if `n == 1`. */ |
| 77 | inline int log2(int n) { |
nothing calls this directly
no outgoing calls
no test coverage detected