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

17
LINES

< > BotCompany Repo | #1005551 // blendPoints

JavaX fragment (include)

1  
static Point blendPoints(Point x, Point y, double yish) {
2  
  double xish = 1-yish;
3  
  ret new Point((int) (x.x*xish+y.x*yish), (int) (x.y*xish+y.y*yish));
4  
}
5  
6  
static Pt blendPoints(Pt x, Pt y, double yish) {
7  
  double xish = 1-yish;
8  
  ret new Pt((int) (x.x*xish+y.x*yish), (int) (x.y*xish+y.y*yish));
9  
}
10  
11  
static Pt blendPoints(Pt x, double xf, Pt y, double yf) {
12  
  ret new Pt((int) (x.x*xf+y.x*yf), (int) (x.y*xf+y.y*yf));
13  
}
14  
15  
static Pt blendPoints(int x1, int y1, int x2, int y2, double yish) {
16  
  ret blendPoints(new Pt(x1, y1), new Pt(x2, y2), yish);
17  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1005551
Snippet name: blendPoints
Eternal ID of this version: #1005551/5
Text MD5: 4e99f8365a7806f5fd36cbb9cb47f09e
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-03-15 01:14:48
Source code size: 566 bytes / 17 lines
Pitched / IR pitched: No / No
Views / Downloads: 589 / 580
Version history: 4 change(s)
Referenced in: [show references]