Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

7
LINES

< > BotCompany Repo | #1031962 // roundedRatio

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (3023L/17K).

static int roundedRatio(double a, double b) {
  ret iround(ratio(a, b));
}

static int roundedRatio(int a, int b) {
  ret (a+b/2-1)/b;
}

Author comment

Began life as a copy of #1026631

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx

No comments. add comment

Snippet ID: #1031962
Snippet name: roundedRatio
Eternal ID of this version: #1031962/1
Text MD5: 41624497a533341f3f32d473b3754f91
Transpilation MD5: 6954ebcd27d6ebd01379eed3c4f2934a
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-08-05 23:44:17
Source code size: 142 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 151 / 224
Referenced in: [show references]