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

7
LINES

< > BotCompany Repo | #1015000 // varyRoundedBoxWithColor

JavaX fragment (include)

1  
static void varyRoundedBoxWithColor(RoundedBoxWithColor l, int w, int h) {
2  
  int i = random(4);
3  
  if (i == 0) l.a = varyPoint(l.a, w, h);
4  
  else if (i == 1) l.b = varyPoint(l.b, w, h);
5  
  else if (i == 2) l.roundness = max(0, varyInt(l.roundness));
6  
  else l.color = varyColor(l.color);
7  
}

Author comment

Began life as a copy of #1014954

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: #1015000
Snippet name: varyRoundedBoxWithColor
Eternal ID of this version: #1015000/1
Text MD5: f7d2d8079c7255d1bc5747743c4231a9
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-05-06 22:53:17
Source code size: 292 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 343 / 379
Referenced in: [show references]