diff options
author | vng <viktor.govako@gmail.com> | 2011-01-30 19:48:10 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:11:19 +0300 |
commit | 0c8521ffc3fa545ad815b2419c8c972ed744a33f (patch) | |
tree | 6750bf7cecf3a01f36d9301a867f0207a3482ed8 /indexer/point_to_int64.hpp | |
parent | ede8645c54bb07206b0cf8927395d71eef9bbeeb (diff) |
Factor Int64ToPoint, PointToInt64 and their helper functions into a separate header,
Diffstat (limited to 'indexer/point_to_int64.hpp')
-rw-r--r-- | indexer/point_to_int64.hpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/indexer/point_to_int64.hpp b/indexer/point_to_int64.hpp new file mode 100644 index 0000000000..3bb7325c40 --- /dev/null +++ b/indexer/point_to_int64.hpp @@ -0,0 +1,22 @@ +#pragma once + +#include "../geometry/cellid.hpp" +#include "../geometry/rect2d.hpp" + +#include "../std/utility.hpp" + + +typedef double CoordT; +typedef pair<CoordT, CoordT> CoordPointT; + +typedef m2::CellId<19> RectId; + +m2::PointU PointD2PointU(CoordT x, CoordT y); +CoordPointT PointU2PointD(m2::PointU const & p); + +int64_t PointToInt64(CoordT x, CoordT y); +inline int64_t PointToInt64(CoordPointT const & pt) { return PointToInt64(pt.first, pt.second); } +CoordPointT Int64ToPoint(int64_t v); + +pair<int64_t, int64_t> RectToInt64(m2::RectD const & r); +m2::RectD Int64ToRect(pair<int64_t, int64_t> const & p); |