GCC Code Coverage Report


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

src/geo2d/pred/is_ins_sl/lib.hpp
Line Branch Exec Source
1 #pragma once
2
3 #include "../../ds/l/lib.hpp"
4
5 namespace tifa_libs {
6
7 // judge if segment and line are intersected
8 template <class FP, bool contain_endpoints = true>
9 285538310 CEXP bool is_ins_SL(line<FP> CR s, line<FP> CR l) NE {
10 285538310 const auto a = l.toleft(s.l), b = l.toleft(s.r);
11
6/6
✓ Branch 0 taken 285535084 times.
✓ Branch 1 taken 3226 times.
✓ Branch 2 taken 285531858 times.
✓ Branch 3 taken 3226 times.
✓ Branch 4 taken 47553486 times.
✓ Branch 5 taken 237978372 times.
285538310 if CEXP (contain_endpoints) return !a || !b || a != b;
12 else return a && b && !(a + b);
13 }
14
15 } // namespace tifa_libs
16