Size::Clamp

Size::Clamp
inline Size<T>& Clamp(const Size<T> & sz);
inline Size<T>& Clamp(T w, T h);
Description

Clamp clamps the current size to alternate values by comparing them to the component values. The lesser values are chosen. The following expression may be used to represent the result:

   (Width, Height) = (min(Width, [sz.Width, w]), min(Height, [sz.Height, h]))
Parameters
Parameters 
Description 
const Size<T> & sz 
A size that is clamped to the current size. 
T w 
A value that is clamped to the Width component of the current size. 
T h 
A value that is clamped to the Height component of the current size. 
Return Value

A Size reference to the current string whose original components are clamped to passed values.