static Rect randomScreenRect(int w, int h) { Dimension screen = screenSize(); ret new Rect(random(screen.width-w), random(screen.height-h), min(w, screen.width), min(h, screen.height)); }
Began life as a copy of #1005345
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: | #1006813 |
Snippet name: | randomScreenRect |
Eternal ID of this version: | #1006813/1 |
Text MD5: | ff747537c15d275d3a9bf37af1d29f7b |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-02-05 03:18:17 |
Source code size: | 194 bytes / 4 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 539 / 570 |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |