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

7
LINES

< > BotCompany Repo | #1015062 - random_incl - random int between a (inclusive) and b (inclusive)

JavaX fragment (include)

static int random_incl(int min, int max, Random random default defaultRandomizer()) {
  ret random(min, max+1, random);
}

static int random_incl(int max) {
  ret random(0, max+1);
}

Author comment

Began life as a copy of #1007391

download  show line numbers  debug dex   

Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, xrpafgyirdlv

No comments. add comment

Snippet ID: #1015062
Snippet name: random_incl - random int between a (inclusive) and b (inclusive)
Eternal ID of this version: #1015062/3
Text MD5: 018ac6730e7789c04d0f38db9c55a85c
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-07-30 20:03:55
Source code size: 188 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 167 / 182
Version history: 2 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1015062 & http://1015062.tinybrain.de