src/geo2d/ains/poc/lib.hpp
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #pragma once | ||
| 2 | |||
| 3 | #include "../../../math/kahan/lib.hpp" | ||
| 4 | #include "../../ds/c/lib.hpp" | ||
| 5 | #include "../../ds/po/lib.hpp" | ||
| 6 | #include "../ct_s/lib.hpp" | ||
| 7 | |||
| 8 | namespace tifa_libs { | ||
| 9 | |||
| 10 | template <class FP> | ||
| 11 | 32 | CEXP FP area_PoC(polygon<FP> CR po, circle<FP> CR c) NE { | |
| 12 | 32 | kahan<FP> ans{}; | |
| 13 | 32 | cu32 n = po.size(); | |
| 14 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 32 times.
|
32 | retif_((n < 3) [[unlikely]], ans); |
| 15 |
2/2✓ Branch 5 taken 733 times.
✓ Branch 6 taken 32 times.
|
765 | flt_ (u32, i, 0, n) ans += sarea_CT(c, po[i], po[po.next(i)]); |
| 16 | 32 | return abs<FP>(ans); | |
| 17 | } | ||
| 18 | |||
| 19 | } // namespace tifa_libs | ||
| 20 |