clamp method

Box clamp(
  1. Box maxBox,
  2. Box minBox
)

@param maxBox -- Beginning of range @param minBox -- End of range

Implementation

Box clamp(Box maxBox, Box minBox)
{
  return max(maxBox).min(minBox);
}