static void web_placeNodesOnU(L<WebNode> nodes) { for i over nodes: { WebNode n = nodes.get(i); double phi = (i/(double) (l(nodes)-1)+1.5)*pi(); double x = sin(phi), y = cos(phi); n.x = 0.5+x*0.45; n.y = 0.06+y*0.81; } }
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: | #1010377 |
Snippet name: | web_placeNodesOnU - arrange nodes in a U shape |
Eternal ID of this version: | #1010377/7 |
Text MD5: | 32c806889c715f6b8a73df5e9758d7e6 |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-09-13 17:22:57 |
Source code size: | 252 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 525 / 532 |
Version history: | 6 change(s) |
Referenced in: | [show references] |