Welcome to mirror list, hosted at ThFree Co, Russian Federation.

pointd_to_pointu.hpp « coding - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e5fd99a04283205d53aa0f90ea4fbc50787533cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#pragma once

#include "geometry/point2d.hpp"

#include <cstdint>

#define POINT_COORD_BITS 30

uint32_t DoubleToUint32(double x, double min, double max, uint32_t coordBits);

double Uint32ToDouble(uint32_t x, double min, double max, uint32_t coordBits);

m2::PointU PointDToPointU(double x, double y, uint32_t coordBits);

m2::PointU PointDToPointU(m2::PointD const & pt, uint32_t coordBits);

m2::PointD PointUToPointD(m2::PointU const & p, uint32_t coordBits);