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

7
LINES

< > BotCompany Repo | #1009846 // distance - euclidean distance

JavaX fragment (include)

static double distance(double ax, double ay, double bx, double by) {
  ret sqrt(sqr(bx-ax)+sqr(by-ay));
}

static int distance(int a, int b) {
  ret abs(a-b);
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1009846
Snippet name: distance - euclidean distance
Eternal ID of this version: #1009846/3
Text MD5: 220afb19328e12b686dc30ecdd884f90
Author: stefan
Category: javax / maths
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-10-29 00:07:39
Source code size: 166 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 401 / 419
Version history: 2 change(s)
Referenced in: [show references]