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); }
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: | 508 / 535 |
Version history: | 1 change(s) |
Referenced in: | [show references] |