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

Function ticks_alpha

Gui/ticks.cpp:175–184  ·  view source on GitHub ↗

compute alpha value for drawing the ticks

Source from the content-addressed store, hash-verified

173
174// compute alpha value for drawing the ticks
175double
176ticks_alpha(double min,
177 double max,
178 double val)
179{
180 assert(val > 0. && min > 0. && max > 0. && max > min);
181 const double alpha = sqrt( (val - min) / (max - min) );
182
183 return std::max( 0., std::min(alpha, 1.) );
184}
185

Callers 5

paintEventMethod · 0.85
drawScaleMethod · 0.85
paintGLMethod · 0.85
drawScaleMethod · 0.85
drawScaleMethod · 0.85

Calls 2

maxFunction · 0.85
sqrtFunction · 0.50

Tested by

no test coverage detected