Could also write this with ternary operator, but I figured std::min was most legible way to handle both cases (and didn't need to pull in CinderMath).