Returns 'value' rounded down to the nearest multiple of 'factor'
| 94 | |
| 95 | // Returns 'value' rounded down to the nearest multiple of 'factor' |
| 96 | constexpr int64_t RoundDown(int64_t value, int64_t factor) { |
| 97 | return (value / factor) * factor; |
| 98 | } |
| 99 | |
| 100 | // Returns 'value' rounded up to the nearest multiple of 'factor' when factor |
| 101 | // is a power of two. |
no outgoing calls