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

7
LINES

< > BotCompany Repo | #1020216 // idiv_ceil - integer divide, round up

JavaX fragment (include)

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

static int idiv_ceil(long a, long b) {
  ret toInt_checked((a+b-1)/b);
}

download  show line numbers  debug dex  old transpilations   

Travelled to 9 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1020216
Snippet name: idiv_ceil - integer divide, round up
Eternal ID of this version: #1020216/2
Text MD5: bf6f22b0781c300486c274cc345b859d
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-01-03 18:03:53
Source code size: 135 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 278 / 329
Version history: 1 change(s)
Referenced in: [show references]