1 | static int toIntPercent(double ratio) { |
2 | ret roundToInt(ratio*100); |
3 | } |
4 | |
5 | // when used with map function |
6 | static int toIntPercent(float ratio) { |
7 | ret toIntPercent((double) ratio); |
8 | } |
Began life as a copy of #1005131
download show line numbers debug dex old transpilations
Travelled to 22 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ekrmjmnbrukm, gwrvuhgaqvyk, ishqpsrjomds, jcllbfdqhrgy, lpdgvwnxivlt, mowyntqkapby, mqqgnosmbjvj, nazvggbglmsf, omdjrrnzbjjv, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, snaazhdonpnp, tslmcundralx, tvejysmllsmz, vouqrxazstgt, whxojlpjdney, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1006968 |
Snippet name: | toIntPercent |
Eternal ID of this version: | #1006968/3 |
Text MD5: | 3a18b8f8a92b4a29b5ca660828a3ee3e |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-08-31 23:35:48 |
Source code size: | 186 bytes / 8 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 494 / 2496 |
Version history: | 2 change(s) |
Referenced in: | [show references] |