Dimension struct reference


Describes the size of two-dimensional space. Available variants: size_t, int, float.

Functions documentation

Dimension<T>& operator+=(const Dimension<T>& rhs);

Operator overload (+=) - allows to add objects in easy way.


Dimension<T> operator+(const Dimension<T>& rhs);

Operator overload (+) - allows to add objects in easy way.


Dimension<T> operator-(const Dimension<T>& rhs);

Operator overload (-) - allows to subtract objects in easy way.


Dimension<T>& operator-=(const Dimension<T>& rhs);

Operator overload (-=) - allows to subtract objects in easy way.


Default constructor. Width and Height values are set to 0.


Dimension(T width, T height);

Constructor that sets values.


Destructor.


void Set(T width, T height);

Dimension setter.


std::string ToString();

Returns a string describing the dimensions of the space. Notice: it will cast the data to 'int'.


Variables documentation

T tWidth;

Specifies the width.


T tHeight;

Specifies the height.