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

9
LINES

< > BotCompany Repo | #1009852 // calAverageCenter

JavaX fragment (include)

static DoublePt calAverageCenter(CirclesAndLines cal) {
  int n = l(cal.circles);
  if (n == 0) null;
  double x = 0, y = 0;
  for (Circle c : cal.circles) {
    x += c.x; y += c.y;
  }
  ret DoublePt(x/n, y/n);
}

Author comment

Began life as a copy of #1009850

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: #1009852
Snippet name: calAverageCenter
Eternal ID of this version: #1009852/2
Text MD5: 3ecf7b2459af0ed68eacd98edede02c4
Author: stefan
Category: javax / a.i. / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-08-21 22:32:12
Source code size: 221 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 425 / 456
Version history: 1 change(s)
Referenced in: [show references]