mirror of
https://codeberg.org/comaps/comaps
synced 2026-01-08 13:27:57 +00:00
ADL for AlmostEqual* and use math:: instead of base:: (#9634)
* ADL for AlmostEqual* and use math:: instead of base:: Signed-off-by: Alexander Borsuk <me@alex.bio>
This commit is contained in:
committed by
Konstantin Pastbin
parent
82133c5743
commit
30718e106e
@@ -36,12 +36,12 @@ double constexpr kAnglesInBucket = 360.0 / kNumBuckets;
|
||||
double ToAngleInDeg(uint32_t angleInBuckets)
|
||||
{
|
||||
CHECK_LESS_OR_EQUAL(angleInBuckets, 255, ());
|
||||
return base::Clamp(kAnglesInBucket * static_cast<double>(angleInBuckets), 0.0, 360.0);
|
||||
return math::Clamp(kAnglesInBucket * static_cast<double>(angleInBuckets), 0.0, 360.0);
|
||||
}
|
||||
|
||||
uint32_t BearingInDeg(m2::PointD const & a, m2::PointD const & b)
|
||||
{
|
||||
auto const angle = location::AngleToBearing(base::RadToDeg(ang::AngleTo(a, b)));
|
||||
auto const angle = location::AngleToBearing(math::RadToDeg(ang::AngleTo(a, b)));
|
||||
CHECK(0.0 <= angle && angle <= 360.0, (angle));
|
||||
return angle;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user