| 526 | |
| 527 | template<typename PointT> |
| 528 | inline |
| 529 | double PatchWork<PointT>::xy2theta(const double &x, const double &y) { // 0 ~ 2 * PI |
| 530 | /* |
| 531 | if (y >= 0) { |
| 532 | return atan2(y, x); // 1, 2 quadrant |
| 533 | } else { |
| 534 | return 2 * M_PI + atan2(y, x);// 3, 4 quadrant |
| 535 | } |
| 536 | */ |
| 537 | auto atan_value = atan2(y,x); // EDITED! |
| 538 | return atan_value > 0 ? atan_value : atan_value + 2*M_PI; // EDITED! |
| 539 | } |
| 540 | |
| 541 | template<typename PointT> |
| 542 | inline |
nothing calls this directly
no outgoing calls
no test coverage detected