MCPcopy Create free account
hub / github.com/chrxh/alien / calcZoomFactor

Method calcZoomFactor

source/Gui/SimulationInteractionController.cpp:436–442  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

434}
435
436float SimulationInteractionController::calcZoomFactor(std::chrono::steady_clock::time_point const& lastTimepoint)
437{
438 auto now = std::chrono::steady_clock::now();
439 auto duration = toFloat(std::chrono::duration_cast<std::chrono::milliseconds>(now - lastTimepoint).count());
440 _lastZoomTimepoint = now;
441 return powf(Viewport::get().getZoomSensitivity(), duration / 15);
442}

Callers

nothing calls this directly

Calls 2

toFloatFunction · 0.85
getZoomSensitivityMethod · 0.80

Tested by

no test coverage detected