| 38 | double const kAnglesInBucket = 360.0 / kNumBuckets; |
| 39 | |
| 40 | uint32_t Bearing(m2::PointD const & a, m2::PointD const & b) |
| 41 | { |
| 42 | auto const angle = location::AngleToBearing(math::RadToDeg(ang::AngleTo(a, b))); |
| 43 | CHECK_LESS_OR_EQUAL(angle, 360, ("Angle should be less than or equal to 360.")); |
| 44 | CHECK_GREATER_OR_EQUAL(angle, 0, ("Angle should be greater than or equal to 0")); |
| 45 | return math::Clamp(angle / kAnglesInBucket, 0.0, 255.0); |
| 46 | } |
| 47 | } // namespace |
| 48 | |
| 49 | // Router::Vertex::Score --------------------------------------------------------------------------- |
no test coverage detected