Libraryless. Click here for Pure Java version (4136L/24K).
1 | static Rect scaleRect_floor(Rect r, double factorX, double factorY default factorX) { |
2 | ret rectFromPoints( |
3 | ifloor(r.x*factorX), |
4 | ifloor(r.y*factorY), |
5 | ifloor(r.x2()*factorX), |
6 | ifloor(r.y2()*factorY)); |
7 | } |
8 | |
9 | static Rect scaleRect_floor(double factor, Rect r) { |
10 | ret scaleRect_floor(r, factor); |
11 | } |
12 | |
13 | static Rect scaleRect_floor(DoubleRect r, double factorX, double factorY default factorX) { |
14 | ret rect( |
15 | ifloor(r.x*factorX), |
16 | ifloor(r.y*factorY), |
17 | ifloor(r.w*factorX), |
18 | ifloor(r.h*factorY)); |
19 | } |
Began life as a copy of #1005837
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx
No comments. add comment
Snippet ID: | #1032479 |
Snippet name: | scaleRect_floor |
Eternal ID of this version: | #1032479/2 |
Text MD5: | c7f1ff2cd7f9f6dc8b62126e01b0e605 |
Transpilation MD5: | 1adfdbdc436a60012746ac3e4834a0c4 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-09-08 08:08:34 |
Source code size: | 532 bytes / 19 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 161 / 233 |
Version history: | 1 change(s) |
Referenced in: | [show references] |