Libraryless. Click here for Pure Java version (35L/1K).
static long roundUpToPowerOfTen(int i) { ret i <= 1000000 ? i <= 1000 ? i <= 1 ? 1 : i <= 10 ? 10 : i <= 100 ? 100 : 1000 : i <= 10000 ? 10000 : i <= 100000 ? 100000 : 1000000 : i <= 1000000000 ? i <= 10000000 ? 10000000 : i <= 100000000 ? 100000000 : 1000000000 : 10000000000; }
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
| Snippet ID: | #1029057 |
| Snippet name: | roundUpToPowerOfTen [smallest power of 10 is 1] |
| Eternal ID of this version: | #1029057/4 |
| Text MD5: | 7cadcceaafe65733f91a3a069804a394 |
| Transpilation MD5: | 1497fec9e6a1ea108e081a9403865a2e |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2020-07-18 18:39:44 |
| Source code size: | 326 bytes / 10 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 430 / 556 |
| Version history: | 3 change(s) |
| Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1029060 - roundUpToPowerOfTen_double #1029063 - roundUpSizeToPowerOfTen |