GCC Code Coverage Report


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

src/geo2d/pred/is_on_s/lib.hpp
Line Branch Exec Source
1 #pragma once
2
3 #include "../../ds/l/lib.hpp"
4 #include "../is_in_middle_p/lib.hpp"
5 #include "../is_on_same_l/lib.hpp"
6
7 namespace tifa_libs {
8
9 template <class FP, bool contain_endpoints = true>
10 378759 CEXP bool is_on_S(line<FP> CR s, point<FP> CR p) NE {
11
4/4
✓ Branch 1 taken 2867 times.
✓ Branch 2 taken 375892 times.
✓ Branch 4 taken 304 times.
✓ Branch 5 taken 2563 times.
378759 if CEXP (contain_endpoints) return is_on_same_L(s.l, s.r, p) && is_in_middle(s.l, p, s.r);
12 else return s.toleft(p) == 0 && sgn((p - s.l) * (s.l - s.r)) * sgn((p - s.r) * (s.l - s.r)) < 0;
13 }
14
15 } // namespace tifa_libs
16