static S floatToYesNo(float d) { if (d == 1) ret "Yes"; if (d == 0) ret "No"; if (d == 0.5) ret "Undecided"; if (d > 0.5) ret "Yes (" + toIntPercent(d) + "%)"; ret "No ("+ toIntPercent(d) + "%)"; }
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1011125 |
| Snippet name: | floatToYesNo |
| Eternal ID of this version: | #1011125/5 |
| Text MD5: | bf13e644ff0cc64fc3d5016153be5c7c |
| Author: | stefan |
| Category: | javax / a.i. |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2017-10-15 17:32:39 |
| Source code size: | 213 bytes / 7 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 717 / 723 |
| Version history: | 4 change(s) |
| Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |