1 | static int ratioToIntPercent_avoid100(double x, double y) { |
2 | int i = roundToInt(x*100/y); |
3 | ret i == 100 && x != y ? 99 : i; |
4 | } |
Began life as a copy of #1005131
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: | #1015206 |
Snippet name: | ratioToIntPercent_avoid100 |
Eternal ID of this version: | #1015206/3 |
Text MD5: | 0adee98bd7646d5dd63ec9fb5343860f |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-05-10 19:15:45 |
Source code size: | 130 bytes / 4 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 335 / 364 |
Version history: | 2 change(s) |
Referenced in: | [show references] |