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

7
LINES

< > BotCompany Repo | #1029053 // randomByte - out of full byte range (including negative values)

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

Libraryless. Click here for Pure Java version (2494L/16K).

static byte randomByte() {
  ret (byte) random(256);
}

static int randomByte(Random random) {
  ret (byte) random(random, 256);
}

Author comment

Began life as a copy of #1024425

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1029053
Snippet name: randomByte - out of full byte range (including negative values)
Eternal ID of this version: #1029053/1
Text MD5: 7cb51076a56e630ee197cbc6f7e36c24
Transpilation MD5: e7ebb136501daeb7c64b392358233933
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-07-18 18:01:59
Source code size: 136 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 180 / 274
Referenced in: [show references]