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

7
LINES

< > BotCompany Repo | #1016924 // ptDistanceSquared - squared distance between two points (Pt)

JavaX fragment (include)

1  
static double ptDistanceSquared(Pt a, Pt b) {
2  
  ret sqr(a.x-b.x) + sqr(a.y-b.y);
3  
}
4  
5  
static double ptDistanceSquared(double x1, double y1, double x2, double y2) {
6  
  ret sqr(x1-x2) + sqr(y1-y2);
7  
}

Author comment

Began life as a copy of #1005804

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1016924
Snippet name: ptDistanceSquared - squared distance between two points (Pt)
Eternal ID of this version: #1016924/1
Text MD5: a4e83a9d3739d973ce2a6818359adc56
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-07-08 00:42:02
Source code size: 200 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 409 / 430
Referenced in: [show references]