| 29 | double const kAnglesInBucket = 360.0 / kNumBuckets; |
| 30 | |
| 31 | uint32_t Bearing(m2::PointD const & a, m2::PointD const & b) |
| 32 | { |
| 33 | auto const angle = location::AngleToBearing(math::RadToDeg(ang::AngleTo(a, b))); |
| 34 | CHECK_LESS_OR_EQUAL(angle, 360, ("Angle should be less than or equal to 360.")); |
| 35 | CHECK_GREATER_OR_EQUAL(angle, 0, ("Angle should be greater than or equal to 0")); |
| 36 | return math::Clamp(angle / kAnglesInBucket, 0.0, 255.0); |
| 37 | } |
| 38 | } // namespace cpg |
| 39 | |
| 40 | // CandidatePathsGetter::Link ---------------------------------------------------------------------- |
no test coverage detected