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

Method GetScaleFactor

qt/qt_common/scale_slider.cpp:55–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53}
54
55double ScaleSlider::GetScaleFactor() const
56{
57 double const oldValue = value();
58 double const newValue = sliderPosition();
59
60 if (oldValue == newValue)
61 return 1.0;
62 double const f = pow(2, fabs(oldValue - newValue) / m_factor);
63 return (newValue > oldValue ? f : 1.0 / f);
64}
65
66void ScaleSlider::SetPosWithBlockedSignals(double pos)
67{

Callers 1

ScaleChangedMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected