Libraryless. Click here for Pure Java version (2812L/16K).
1 | // points are oriented clockwise, starting at top |
2 | // angle is in radians |
3 | static Pt pointOnCircle(Pt center, double radius, double angle) { |
4 | ret pt( |
5 | iround(center.x + sin(angle)*radius), |
6 | iround(center.y - cos(angle)*radius)); |
7 | } |
Began life as a copy of #1030538
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
Snippet ID: | #1030559 |
Snippet name: | pointOnCircle |
Eternal ID of this version: | #1030559/2 |
Text MD5: | 45b35877171cc3b2826b03b8190328a7 |
Transpilation MD5: | c79c54ba361989600e95da79ae8097f4 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-01-07 18:41:00 |
Source code size: | 241 bytes / 7 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 198 / 269 |
Version history: | 1 change(s) |
Referenced in: | [show references] |