MCPcopy Create free account
hub / github.com/comaps/comaps / CalculateCenter

Function CalculateCenter

libs/drape_frontend/screen_operations.cpp:34–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34m2::PointD CalculateCenter(double scale, m2::RectD const & pixelRect, m2::PointD const & userPos,
35 m2::PointD const & pixelPos, double azimuth)
36{
37 m2::PointD formingVector = (pixelRect.Center() - pixelPos) * scale;
38 formingVector.y = -formingVector.y;
39 formingVector.Rotate(azimuth);
40 return userPos + formingVector;
41}
42
43m2::PointD CalculateCenter(ScreenBase const & screen, m2::PointD const & userPos, m2::PointD const & pixelPos,
44 double azimuth)

Callers

nothing calls this directly

Calls 3

SizeXMethod · 0.80
CenterMethod · 0.45
RotateMethod · 0.45

Tested by

no test coverage detected