1 | static S floatToYesNo(float d) {
|
2 | if (d == 1) ret "Yes"; |
3 | if (d == 0) ret "No"; |
4 | if (d == 0.5) ret "Undecided"; |
5 | if (d > 0.5) ret "Yes (" + toIntPercent(d) + "%)";
|
6 | ret "No ("+ toIntPercent(d) + "%)";
|
7 | } |
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: | 718 / 724 |
| Version history: | 4 change(s) |
| Referenced in: | [show references] |