| 34 | // Writes the difference of two 2d vectors to sink. |
| 35 | template <typename Sink> |
| 36 | void EncodePointDelta(Sink & sink, m2::PointU const & curr, m2::PointU const & next) |
| 37 | { |
| 38 | auto const dx = base::asserted_cast<int32_t>(next.x) - base::asserted_cast<int32_t>(curr.x); |
| 39 | auto const dy = base::asserted_cast<int32_t>(next.y) - base::asserted_cast<int32_t>(curr.y); |
| 40 | WriteVarInt(sink, dx); |
| 41 | WriteVarInt(sink, dy); |
| 42 | } |
| 43 | |
| 44 | // Reads the encoded difference from |source| and returns the |
| 45 | // point equal to |base| + difference. |
no test coverage detected