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

4
LINES

< > BotCompany Repo | #1032493 // randomDoubleRect_minSize_maxSize

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

Libraryless. Click here for Pure Java version (4030L/23K).

static DoubleRect randomDoubleRect_minSize_maxSize(DoubleRect outer, double minX, double minY, double maxX, double maxY) {
  double w = random(minX, maxX), h = random(minY, maxY);
  ret DoubleRect(outer.x+random(outer.w-w), outer.y+random(outer.h-h), w, h);
}

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx

No comments. add comment

Snippet ID: #1032493
Snippet name: randomDoubleRect_minSize_maxSize
Eternal ID of this version: #1032493/1
Text MD5: 305c5fbc34f2bdaa637d4b2ea86c5061
Transpilation MD5: 3aac63d2e07c621e8181c4ff5fc1431b
Author: stefan
Category: javax / maths
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-09-10 17:43:33
Source code size: 262 bytes / 4 lines
Pitched / IR pitched: No / No
Views / Downloads: 81 / 116
Referenced in: [show references]