Size::ClampedTo

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

ClampedTo 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:

   (result.Width, result.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 new Size whose components are determined by clamping the components of the current size to alternate values.