| 1 | static Rect rectAround(Pt p, int w, int h default w) {
 | 
| 2 | ret new Rect(p.x-w/2, p.y-h/2, w, h); | 
| 3 | } | 
| 4 | |
| 5 | static Rect rectAround(int x, int y, int w, int h) {
 | 
| 6 | ret new Rect(x-w/2, y-h/2, w, h); | 
| 7 | } | 
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, sawdedvomwva, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1006030 | 
| Snippet name: | rectAround - rectangle centered around a point. arguments given are the final width and height of the rect | 
| Eternal ID of this version: | #1006030/4 | 
| Text MD5: | f73baab3c5d76f5fda568f4717449e33 | 
| Author: | stefan | 
| Category: | javax | 
| Type: | JavaX fragment (include) | 
| Public (visible to everyone): | Yes | 
| Archived (hidden from active list): | No | 
| Created/modified: | 2021-08-21 04:34:33 | 
| Source code size: | 194 bytes / 7 lines | 
| Pitched / IR pitched: | No / No | 
| Views / Downloads: | 787 / 864 | 
| Version history: | 3 change(s) | 
| Referenced in: | [show references] |