Libraryless. Click here for Pure Java version (4030L/23K).
1 | static DoubleRect randomDoubleRect_minSize_maxSize(DoubleRect outer, double minX, double minY, double maxX, double maxY) { |
2 | double w = random(minX, maxX), h = random(minY, maxY); |
3 | ret DoubleRect(outer.x+random(outer.w-w), outer.y+random(outer.h-h), w, h); |
4 | } |
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: | 153 / 205 |
Referenced in: | [show references] |