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

5
LINES

< > BotCompany Repo | #1030538 // pointsAroundCircle

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (9220L/51K).

1  
// points are oriented clockwise, starting at top
2  
static L<Pt> pointsAroundCircle(Pt center, int n, double radius) {
3  
  double step = doubleRatio(pi()*2, n);
4  
  ret listFromFunction(n, i -> pointOnCircle(center, radius, i*step));
5  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1030538
Snippet name: pointsAroundCircle
Eternal ID of this version: #1030538/7
Text MD5: d06f3b3c4d37605552a1c4e662ae382e
Transpilation MD5: 418024a5bcf950637c97fce96311f518
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-06-02 01:21:40
Source code size: 233 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 246 / 375
Version history: 6 change(s)
Referenced in: [show references]