1 | static S formatDoubleFull(double d, int digits) {
|
2 | S format = digits <= 0 ? "0" : "0." + rep(digits, '0'); |
3 | ret new java.text.DecimalFormat(format, new java.text.DecimalFormatSymbols(Locale.ENGLISH)).format(d); |
4 | } |
Began life as a copy of #1007643
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1007644 |
| Snippet name: | formatDoubleFull - always show full number of digits |
| Eternal ID of this version: | #1007644/4 |
| Text MD5: | a8802783849bc698c8da5a39e8e416a1 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-09-30 14:58:08 |
| Source code size: | 219 bytes / 4 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 982 / 1009 |
| Version history: | 3 change(s) |
| Referenced in: | [show references] |