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

10
LINES

< > BotCompany Repo | #1015020 // randomLineWithColor

JavaX fragment (include)

1  
static int randomLineWithColor_minLineWidth = 2;
2  
static int randomLineWithColor_maxLineWidth = 20;
3  
static double randomLineWithColor_maxThickness = 0.1;
4  
5  
static LineWithColor randomLineWithColor(int w, int h) {
6  
  LineWithColor l = LineWithColor(randomPoint(w, h), randomPoint(w, h), randomColor());
7  
  l.width = random_incl(randomLineWithColor_minLineWidth, randomLineWithColor_maxLineWidth);
8  
  limitLineThickness(l, randomLineWithColor_maxThickness, randomLineWithColor_minLineWidth);
9  
  ret l;
10  
}

Author comment

Began life as a copy of #1014956

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: #1015020
Snippet name: randomLineWithColor
Eternal ID of this version: #1015020/10
Text MD5: 3c24b71800b266b8011d236ae5e0d70e
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-05-07 21:41:38
Source code size: 506 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 336 / 371
Version history: 9 change(s)
Referenced in: [show references]