clan::Sizex< Type > Class Template Reference - ClanLib SDK
Description: clan::Sizex< Type > Class Template Reference

Public Member Functions | Public Attributes | List of all members
clan::Sizex< Type > Class Template Reference
clanCore Math

2D (width,height) size structure. More...

`#include <size.h>`

## Public Member Functions
| Sizex ()
| Constructs a size structure.
template<typename OtherType, typename std::enable_if_t<!std::is_integral< Type >::value||std::is_integral< OtherType >::value, int > = 0>
| Sizex (const Sizex< OtherType > &copy)
template<typename OtherType, typename std::enable_if_t< std::is_integral< Type >::value &&!std::is_integral< OtherType >::value, int > = 0>
| Sizex (const Sizex< OtherType > &copy)
| Sizex (const Sizex< Type > &s)=default
| Constructs a size structure.
| Sizex (Type width, Type height)
| Constructs a size structure.
| operator Vec2< Type > () const
bool | operator!= (const Sizex< Type > &s) const
| Size != Size operator (deep compare).
Sizex< Type > | operator* (const Type &s) const
| Size * operator.
Sizex< Type > & | operator*= (const Type &s)
| Size *= operator.
Sizex< Type > | operator+ (const Sizex< Type > &s) const
| Size + Size operator.
Sizex< Type > | operator+ (const Type &s) const
| Size + operator.
Sizex< Type > & | operator+= (const Sizex< Type > &s)
| Size += Size operator.
Sizex< Type > & | operator+= (const Type &s)
| Size += operator.
Sizex< Type > | operator- (const Sizex< Type > &s) const
| Size - Size operator.
Sizex< Type > | operator- (const Type &s) const
| Size - operator.
Sizex< Type > & | operator-= (const Sizex< Type > &s)
| Size -= Size operator.
Sizex< Type > & | operator-= (const Type &s)
| Size -= operator.
Sizex< Type > | operator/ (const Type &s) const
| Size / operator.
Sizex< Type > & | operator/= (const Type &s)
| Size /= operator.
bool | operator== (const Sizex< Type > &s) const
| Size == Size operator (deep compare).

## Public Attributes
Type | height
| Size height.
Type | width
| Size width.

## Detailed Description

template<typename Type>
class clan::Sizex< Type >

2D (width,height) size structure.

These line templates are defined for: int (Size), float (Sizef), double (Sized)

## Constructor & Destructor Documentation

## ◆ Sizex() [1/5]

template<typename Type>

clan::Sizex< Type >::Sizex | ( |  | ) |
| inline

Constructs a size structure.

References height, and width.

Referenced by Sizex(), Sizex(), operator!=(), operator*(), operator*=(), operator+(), operator+(), operator+=(), operator+=(), operator-(), operator-(), operator-=(), operator-=(), operator/(), operator/=(), and operator==().

## ◆ Sizex() [2/5]

template<typename Type>

clan::Sizex< Type >::Sizex | ( | Type | width,
|  | Type | height )
| inline

Constructs a size structure.

Parameters

  width | Initial width of size structure.
  height | Initial height of size structure.

References height, and width.

## ◆ Sizex() [3/5]

template<typename Type>

clan::Sizex< Type >::Sizex | ( | const Sizex< Type > & | s | ) |
| default

Constructs a size structure.

Parameters

  s | = Size structure to construct this one from.

References Sizex().

## ◆ Sizex() [4/5]

template<typename Type>
template<typename OtherType, typename std::enable_if_t< std::is_integral< Type >::value &&!std::is_integral< OtherType >::value, int > = 0>

clan::Sizex< Type >::Sizex | ( | const Sizex< OtherType > & | copy | ) |
| inline

References Sizex(), height, and width.

## ◆ Sizex() [5/5]

template<typename Type>
template<typename OtherType, typename std::enable_if_t<!std::is_integral< Type >::value||std::is_integral< OtherType >::value, int > = 0>

clan::Sizex< Type >::Sizex | ( | const Sizex< OtherType > & | copy | ) |
| inline

References Sizex(), height, and width.

## Member Function Documentation

## ◆ operator Vec2< Type >()

template<typename Type>

clan::Sizex< Type >::operator Vec2< Type > | ( |  | ) | const
| inline

## ◆ operator!=()

template<typename Type>

bool clan::Sizex< Type >::operator!= | ( | const Sizex< Type > & | s | ) | const
| inline

Size != Size operator (deep compare).

References Sizex(), height, clan::s, and width.

## ◆ operator*()

template<typename Type>

Sizex< Type > clan::Sizex< Type >::operator* | ( | const Type & | s | ) | const
| inline

Size * operator.

References Sizex(), height, clan::s, and width.

## ◆ operator*=()

template<typename Type>

Sizex< Type > & clan::Sizex< Type >::operator*= | ( | const Type & | s | ) |
| inline

Size *= operator.

References Sizex(), height, clan::s, and width.

## ◆ operator+() [1/2]

template<typename Type>

Sizex< Type > clan::Sizex< Type >::operator+ | ( | const Sizex< Type > & | s | ) | const
| inline

Size + Size operator.

References Sizex(), height, clan::s, and width.

## ◆ operator+() [2/2]

template<typename Type>

Sizex< Type > clan::Sizex< Type >::operator+ | ( | const Type & | s | ) | const
| inline

Size + operator.

References Sizex(), height, clan::s, and width.

## ◆ operator+=() [1/2]

template<typename Type>

Sizex< Type > & clan::Sizex< Type >::operator+= | ( | const Sizex< Type > & | s | ) |
| inline

Size += Size operator.

References Sizex(), height, clan::s, and width.

## ◆ operator+=() [2/2]

template<typename Type>

Sizex< Type > & clan::Sizex< Type >::operator+= | ( | const Type & | s | ) |
| inline

Size += operator.

References Sizex(), height, clan::s, and width.

## ◆ operator-() [1/2]

template<typename Type>

Sizex< Type > clan::Sizex< Type >::operator- | ( | const Sizex< Type > & | s | ) | const
| inline

Size - Size operator.

References Sizex(), height, clan::s, and width.

## ◆ operator-() [2/2]

template<typename Type>

Sizex< Type > clan::Sizex< Type >::operator- | ( | const Type & | s | ) | const
| inline

Size - operator.

References Sizex(), height, clan::s, and width.

## ◆ operator-=() [1/2]

template<typename Type>

Sizex< Type > & clan::Sizex< Type >::operator-= | ( | const Sizex< Type > & | s | ) |
| inline

Size -= Size operator.

References Sizex(), height, clan::s, and width.

## ◆ operator-=() [2/2]

template<typename Type>

Sizex< Type > & clan::Sizex< Type >::operator-= | ( | const Type & | s | ) |
| inline

Size -= operator.

References Sizex(), height, clan::s, and width.

## ◆ operator/()

template<typename Type>

Sizex< Type > clan::Sizex< Type >::operator/ | ( | const Type & | s | ) | const
| inline

Size / operator.

References Sizex(), height, clan::s, and width.

## ◆ operator/=()

template<typename Type>

Sizex< Type > & clan::Sizex< Type >::operator/= | ( | const Type & | s | ) |
| inline

Size /= operator.

References Sizex(), height, clan::s, and width.

## ◆ operator==()

template<typename Type>

bool clan::Sizex< Type >::operator== | ( | const Sizex< Type > & | s | ) | const
| inline

Size == Size operator (deep compare).

References Sizex(), height, clan::s, and width.

## Member Data Documentation

## ◆ height

template<typename Type>

Type clan::Sizex< Type >::height

Size height.

Referenced by clan::Size::Size(), clan::Size::Size(), clan::Sized::Sized(), clan::Sized::Sized(), clan::Sizef::Sizef(), clan::Sizef::Sizef(), Sizex(), Sizex(), Sizex(), operator!=(), operator*(), operator*=(), operator+(), operator+(), operator+=(), operator+=(), operator-(), operator-(), operator-=(), operator-=(), operator/(), operator/=(), operator==(), and clan::Rectx< Type >::set_size().

## ◆ width

template<typename Type>

Type clan::Sizex< Type >::width

Size width.

Referenced by clan::Size::Size(), clan::Size::Size(), clan::Sized::Sized(), clan::Sized::Sized(), clan::Sizef::Sizef(), clan::Sizef::Sizef(), Sizex(), Sizex(), Sizex(), operator!=(), operator*(), operator*=(), operator+(), operator+(), operator+=(), operator+=(), operator-(), operator-(), operator-=(), operator-=(), operator/(), operator/=(), operator==(), and clan::Rectx< Type >::set_size().

The documentation for this class was generated from the following file:

- size.h