Libraryless. Click here for Pure Java version (223L/2K).
1 | sbool containsPt(int x1, int y1, int w, int h, Pt p) { |
2 | ret p.x >= x1 && p.y >= y1 && p.x < x1+w && p.y < y1+h; |
3 | } |
4 | |
5 | sbool containsPt(Rect a, int x, int y) { |
6 | ret a != null && a.contains(x, y); |
7 | } |
8 | |
9 | sbool containsPt(Rect a, Pt p) { |
10 | ret a != null && p != null && a.contains(p.x, p.y); |
11 | } |
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: | 159 / 232 |
Version history: | 2 change(s) |
Referenced in: | [show references] |