| 59 | } |
| 60 | |
| 61 | uint64_t EncodePointDeltaAsUint(m2::PointU const & actual, m2::PointU const & prediction) |
| 62 | { |
| 63 | return bits::BitwiseMerge(bits::ZigZagEncode(static_cast<int32_t>(actual.x) - static_cast<int32_t>(prediction.x)), |
| 64 | bits::ZigZagEncode(static_cast<int32_t>(actual.y) - static_cast<int32_t>(prediction.y))); |
| 65 | } |
| 66 | |
| 67 | m2::PointU DecodePointDeltaFromUint(uint64_t delta, m2::PointU const & prediction) |
| 68 | { |