GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 100.0% 5 / 0 / 5
Functions: 100.0% 1 / 0 / 1
Branches: 100.0% 4 / 0 / 4

src/geo2d/rel/cp/lib.hpp
Line Branch Exec Source
1 #pragma once
2
3 #include "../../dis/pp_p/lib.hpp"
4 #include "../../ds/c/lib.hpp"
5
6 namespace tifa_libs {
7
8 // relation between circle and point
9 // clang-format off
10 enum class RELCP : u8 { outside, onborder, inside };
11 // clang-format on
12
13 template <class FP>
14 17443336 CEXP RELCP relation_CP(circle<FP> CR c, point<FP> CR p) NE {
15 17443336 const auto _ = comp_distp(c.o, p, c.r);
16
2/2
✓ Branch 0 taken 17421889 times.
✓ Branch 1 taken 21447 times.
17443336 if (_ < 0) return RELCP::inside;
17
2/2
✓ Branch 0 taken 240 times.
✓ Branch 1 taken 21207 times.
21447 if (_ == 0) return RELCP::onborder;
18 21207 return RELCP::outside;
19 }
20
21 } // namespace tifa_libs
22