2015-01-27 11:44:46 -05:00
|
|
|
#ifndef COMPUTE_ANGLE_HPP
|
|
|
|
#define COMPUTE_ANGLE_HPP
|
|
|
|
|
2016-01-05 10:51:13 -05:00
|
|
|
namespace osrm
|
|
|
|
{
|
|
|
|
namespace util
|
|
|
|
{
|
|
|
|
|
2015-01-27 11:44:46 -05:00
|
|
|
struct FixedPointCoordinate;
|
|
|
|
|
|
|
|
struct ComputeAngle
|
|
|
|
{
|
|
|
|
// Get angle of line segment (A,C)->(C,B)
|
|
|
|
// atan2 magic, formerly cosine theorem
|
|
|
|
static double OfThreeFixedPointCoordinates(const FixedPointCoordinate &first,
|
|
|
|
const FixedPointCoordinate &second,
|
2015-04-02 05:36:04 -04:00
|
|
|
const FixedPointCoordinate &third) noexcept;
|
2015-01-27 11:44:46 -05:00
|
|
|
};
|
|
|
|
|
2016-01-05 10:51:13 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-01-27 11:44:46 -05:00
|
|
|
#endif // COMPUTE_ANGLE_HPP
|