Could also write these with ternary operator, but I figured std::min was most legible way to handle both cases without pulling in CinderMath.