clang format
This commit is contained in:
parent
b573485c31
commit
7837cd61df
@ -22,16 +22,23 @@ namespace coordinate_calculation
|
|||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
class CheapRulerContainer {
|
class CheapRulerContainer
|
||||||
|
{
|
||||||
public:
|
public:
|
||||||
CheapRulerContainer(const int number_of_rulers)
|
CheapRulerContainer(const int number_of_rulers)
|
||||||
: cheap_ruler_cache(number_of_rulers, mapbox::cheap_ruler::CheapRuler(0)), step(90.0 / number_of_rulers) {
|
: cheap_ruler_cache(number_of_rulers, mapbox::cheap_ruler::CheapRuler(0)),
|
||||||
for (int n = 0; n < number_of_rulers; n++) {
|
step(90.0 / number_of_rulers)
|
||||||
cheap_ruler_cache[n] = mapbox::cheap_ruler::CheapRuler(step * (n + 0.5), mapbox::cheap_ruler::CheapRuler::Meters);
|
{
|
||||||
|
for (int n = 0; n < number_of_rulers; n++)
|
||||||
|
{
|
||||||
|
cheap_ruler_cache[n] = mapbox::cheap_ruler::CheapRuler(
|
||||||
|
step * (n + 0.5), mapbox::cheap_ruler::CheapRuler::Meters);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
mapbox::cheap_ruler::CheapRuler& getRuler(const double lat) {
|
mapbox::cheap_ruler::CheapRuler &getRuler(const double lat)
|
||||||
return cheap_ruler_cache[std::min((int)std::floor(abs(lat)/step), (int)cheap_ruler_cache.size() - 1)];
|
{
|
||||||
|
return cheap_ruler_cache[std::min((int)std::floor(abs(lat) / step),
|
||||||
|
(int)cheap_ruler_cache.size() - 1)];
|
||||||
};
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
Reference in New Issue
Block a user