| 565 | |
| 566 | namespace { |
| 567 | cgal_direction_t newell(const std::vector<cgal_point_t> & loop) { |
| 568 | Kernel_::FT a(0.0), b(0.0), c(0.0); |
| 569 | for (size_t i = 0; i < loop.size(); ++i) { |
| 570 | auto & curr = loop[i]; |
| 571 | auto & next = loop[(i + 1) % loop.size()]; |
| 572 | a += (curr.y() - next.y()) * (curr.z() + next.z()); |
| 573 | b += (curr.z() - next.z()) * (curr.x() + next.x()); |
| 574 | c += (curr.x() - next.x()) * (curr.y() + next.y()); |
| 575 | } |
| 576 | return cgal_direction_t(a, b, c); |
| 577 | } |
| 578 | } |
| 579 | |
| 580 | namespace { |
no test coverage detected