Transpiled version (50L) is out of date.
1 | // angle between p1 and p2 with respect to center point |
2 | // result is between 0 and pi()*2 |
3 | static double threePointAngle(IDoublePt p1, IDoublePt center, IDoublePt p2) {
|
4 | double angle = atan2( |
5 | p1.x_double()-center.x_double(), |
6 | p1.y_double()-center.y_double()) |
7 | -atan2( |
8 | p2.x_double()-center.x_double(), |
9 | p2.y_double()-center.y_double()); |
10 | ret mod(angle, pi()*2); |
11 | } |
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
| Snippet ID: | #1034951 |
| Snippet name: | threePointAngle |
| Eternal ID of this version: | #1034951/3 |
| Text MD5: | 151e64228f4d16a9e6edcf76d340cecd |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2022-03-17 21:17:28 |
| Source code size: | 398 bytes / 11 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 416 / 524 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |