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

3
LINES

< > BotCompany Repo | #1006768 // minNonNegative - non-negative minimum of two integers (useful for list index manipulation)

JavaX fragment (include)

1  
static int minNonNegative(int a, int b) {
2  
  ret a < 0 ? b : b < 0 ? a : min(a, b);
3  
}

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: #1006768
Snippet name: minNonNegative - non-negative minimum of two integers (useful for list index manipulation)
Eternal ID of this version: #1006768/1
Text MD5: 2a20713849efd65231525c2d007bd41e
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-02-03 20:16:35
Source code size: 86 bytes / 3 lines
Pitched / IR pitched: No / No
Views / Downloads: 546 / 496
Referenced in: [show references]