MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / getMipMapLevelFromZoomFactor

Method getMipMapLevelFromZoomFactor

Engine/ViewerInstance.cpp:3429–3436  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3427}
3428
3429int
3430ViewerInstance::getMipMapLevelFromZoomFactor() const
3431{
3432 double zoomFactor = _imp->uiContext->getZoomFactor();
3433 double closestPowerOf2 = zoomFactor >= 1 ? 1 : std::pow( 2, -std::ceil(std::log(zoomFactor) / M_LN2) );
3434
3435 return std::log(closestPowerOf2) / M_LN2;
3436}
3437
3438double
3439ViewerInstance::getCurrentTime() const

Calls 4

getZoomFactorMethod · 0.80
powFunction · 0.50
ceilFunction · 0.50
logFunction · 0.50

Tested by

no test coverage detected