Method
print_digits
(Appendable out, int value, int length)
Source from the content-addressed store, hash-verified
| 2306 | } |
| 2307 | } |
| 2308 | private static void print_digits(Appendable out, int value, int length) |
| 2309 | throws IOException |
| 2310 | { |
| 2311 | char temp[] = new char[length]; |
| 2312 | while (length > 0) { |
| 2313 | length--; |
| 2314 | int next = value / 10; |
| 2315 | temp[length] = (char)('0' + (value - next*10)); |
| 2316 | value = next; |
| 2317 | } |
| 2318 | while (length > 0) { |
| 2319 | length--; |
| 2320 | temp[length] = '0'; |
| 2321 | } |
| 2322 | for (char c : temp) { |
| 2323 | out.append(c); |
| 2324 | } |
| 2325 | } |
| 2326 | private static void print_fractional_digits(Appendable out, BigDecimal value) |
| 2327 | throws IOException |
| 2328 | { |
Tested by
no test coverage detected