Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

11
LINES

< > BotCompany Repo | #1010649 // scalePt

JavaX fragment (include) [tags: use-pretranspiled]

Transpiled version (2821L) is out of date.

1  
static Pt scalePt(Pt p, double scaleX, double scaleY default scaleX) {
2  
  ret new Pt(iround(p.x*scaleX), iround(p.y*scaleY));
3  
}
4  
5  
static Pt scalePt(double f, Pt p) {
6  
  ret scalePt(p, f);
7  
}
8  
9  
static Pt scalePt(int w, int h, double f) {
10  
  ret scalePt(Pt(w, h), f);
11  
}

Author comment

Began life as a copy of #1007271

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1010649
Snippet name: scalePt
Eternal ID of this version: #1010649/4
Text MD5: 2af9bff154e82a541787765a54c6631a
Author: stefan
Category: javax / imaging
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-08-17 22:19:10
Source code size: 271 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 453 / 595
Version history: 3 change(s)
Referenced in: [show references]