Libraryless. Click here for Pure Java version (9182L/51K).
static int area(Rect r) { ret rectArea(r); } static double area(DoubleRect r) { ret r == null ? 0 : r.w*r.h; } ifclass WidthAndHeight static int area(WidthAndHeight img) { ret img == null ? 0 : img.getWidth()*img.getHeight(); } endif static int area(BufferedImage img) { ret img == null ? 0 : img.getWidth()*img.getHeight(); }
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: | 201 / 312 |
Version history: | 5 change(s) |
Referenced in: | [show references] |