| 323 | } |
| 324 | |
| 325 | int8_t OHDUtil::calculate_progress_perc(int progress, int total_count) { |
| 326 | if (progress >= total_count) return 100; |
| 327 | if (total_count <= 0) return 100; |
| 328 | const double perc = ((double)progress / (double)total_count * 100.0); |
| 329 | return (int8_t)std::lround(perc); |
| 330 | } |
| 331 | |
| 332 | // https://codeforwin.org/c-programming/c-program-to-get-value-of-nth-bit-of-number |
| 333 | bool OHDUtil::get_nth_bit(long number, int position) { |
nothing calls this directly
no outgoing calls
no test coverage detected