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.

static Pt scalePt(Pt p, double scaleX, double scaleY default scaleX) {
  ret new Pt(iround(p.x*scaleX), iround(p.y*scaleY));
}

static Pt scalePt(double f, Pt p) {
  ret scalePt(p, f);
}

static Pt scalePt(int w, int h, double f) {
  ret scalePt(Pt(w, h), f);
}

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: 394 / 496
Version history: 3 change(s)
Referenced in: [show references]