Libraryless. Click here for Pure Java version (9182L/51K).
1 | static int area(Rect r) {
|
2 | ret rectArea(r); |
3 | } |
4 | |
5 | static double area(DoubleRect r) {
|
6 | ret r == null ? 0 : r.w*r.h; |
7 | } |
8 | |
9 | ifclass WidthAndHeight |
10 | static int area(WidthAndHeight img) {
|
11 | ret img == null ? 0 : img.getWidth()*img.getHeight(); |
12 | } |
13 | endif |
14 | |
15 | static int area(BufferedImage img) {
|
16 | ret img == null ? 0 : img.getWidth()*img.getHeight(); |
17 | } |
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx
No comments. add comment
| Snippet ID: | #1032160 |
| Snippet name: | area - synonym of rectArea + same for DoubleRect |
| Eternal ID of this version: | #1032160/6 |
| Text MD5: | c0df091a7992902a6bfd982813336458 |
| Transpilation MD5: | 59c8a355351663cda4fa8d3f148a298f |
| Author: | stefan |
| Category: | |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2022-07-19 20:37:35 |
| Source code size: | 355 bytes / 17 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 527 / 686 |
| Version history: | 5 change(s) |
| Referenced in: | [show references] |