DISCL-235: Code review Friday refactorings

This is preliminary draft review
std::min( std::max( xWin[i][0], 0. ), (double)renderContext_->getGLWindow()->width() ) and all below functions can use max min, there is no std::clamp right ...