Libraryless. Click here for Pure Java version (223L/2K).
sbool containsPt(int x1, int y1, int w, int h, Pt p) { ret p.x >= x1 && p.y >= y1 && p.x < x1+w && p.y < y1+h; } sbool containsPt(Rect a, int x, int y) { ret a != null && a.contains(x, y); } sbool containsPt(Rect a, Pt p) { ret a != null && p != null && a.contains(p.x, p.y); }
Began life as a copy of #1006664
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx
No comments. add comment
| Snippet ID: | #1032240 |
| Snippet name: | containsPt |
| Eternal ID of this version: | #1032240/3 |
| Text MD5: | 6829773bef463741e7bc5c346baef797 |
| Transpilation MD5: | f4721a267a03196904339667e84dc053 |
| Author: | stefan |
| Category: | javax / maths |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2021-08-21 04:51:09 |
| Source code size: | 295 bytes / 11 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 393 / 503 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |