1 | static double pointDistance(Pt a, Pt b) { |
2 | ret sqrt(sqr(a.x-b.x) + sqr(a.y-b.y)); |
3 | } |
4 | |
5 | static double pointDistance(double x1, double y1, double x2, double y2) { |
6 | ret sqrt(sqr(x1-x2) + sqr(y1-y2)); |
7 | } |
8 | |
9 | ifclass DoublePt |
10 | static double pointDistance(DoublePt a, DoublePt b) { |
11 | ret pointDistance(a.x, a.y, b.x, b.y); |
12 | } |
13 | endif |
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, sawdedvomwva, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1005804 |
Snippet name: | pointDistance - distance between two points (Pt) |
Eternal ID of this version: | #1005804/5 |
Text MD5: | 87a38e858ae951e5929d06c31ecf2011 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-04-15 03:40:19 |
Source code size: | 331 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 552 / 570 |
Version history: | 4 change(s) |
Referenced in: | [show references] |