33 #include "../api_core.h" 41 template<
typename Type>
44 template<
typename Type>
47 template<
typename Type>
54 template<
typename Type>
62 Sizex() : width(0), height(0) {
return; }
69 : width(width), height(height) { }
100 { width += s.
width; height += s.
height;
return *
this; }
104 { width -= s.
width; height -= s.
height;
return *
this; }
116 { width += s; height += s;
return *
this; }
120 { width -= s; height -= s;
return *
this; }
124 { width *= s; height *= s;
return *
this; }
128 { width /= s; height /= s;
return *
this; }
148 {
return (width == s.
width) && (height == s.
height); }
152 {
return (width != s.
width) || (height != s.
height); }
161 Size(
int width,
int height) :
Sizex<int>(width, height) {}
174 Sizef(
float width,
float height) :
Sizex<float>(width, height) {}
187 Sized(
double width,
double height) :
Sizex<double>(width, height) {}
Size(const Sizex< float > ©)
Definition: size.h:165
bool operator!=(const Sizex< Type > &s) const
Size != Size operator (deep compare).
Definition: size.h:151
Type width
Size width.
Definition: size.h:83
Sizex< Type > operator*(const Type &s) const
Size * operator.
Definition: size.h:139
Sizex(Type width, Type height)
Constructs a size structure.
Definition: size.h:68
Sized(const Sizex< float > ©)
Definition: size.h:192
Sized(const Sizex< double > &s)
Definition: size.h:188
Sizex(const Sizex< Type > &s)
Constructs a size structure.
Definition: size.h:74
Sized(const Sizex< int > ©)
Definition: size.h:191
Sizex< Type > & operator-=(const Sizex< Type > &s)
Size -= Size operator.
Definition: size.h:103
Sizef(float width, float height)
Definition: size.h:174
Sizex< Type > operator-(const Sizex< Type > &s) const
Size - Size operator.
Definition: size.h:111
bool operator==(const Sizex< Type > &s) const
Size == Size operator (deep compare).
Definition: size.h:147
Sizef(const Sizex< float > &s)
Definition: size.h:175
Sizex< Type > operator/(const Type &s) const
Size / operator.
Definition: size.h:143
Type height
Size height.
Definition: size.h:86
Sizex< Type > operator+(const Sizex< Type > &s) const
Size + Size operator.
Definition: size.h:107
Sizex< Type > operator+(const Type &s) const
Size + operator.
Definition: size.h:131
Sizef(const Sizex< double > ©)
Definition: size.h:179
Sized(double width, double height)
Definition: size.h:187
Sizex< Type > & operator*=(const Type &s)
Size *= operator.
Definition: size.h:123
Size(const Sizex< double > ©)
Definition: size.h:166
Sizef()
Definition: size.h:173
Size(const Sizex< int > &s)
Definition: size.h:162
Sizex< Type > operator-(const Type &s) const
Size - operator.
Definition: size.h:135
Sizex()
Constructs a size structure.
Definition: size.h:62
Sized(const Vec2< double > &s)
Definition: size.h:189
Size()
Definition: size.h:160
2D (width,height) size structure - Double
Definition: size.h:183
2D vector
Definition: line.h:49
Sized()
Definition: size.h:186
Size(int width, int height)
Definition: size.h:161
Sizef(const Vec2< float > &s)
Definition: size.h:176
Sizex< Type > & operator+=(const Sizex< Type > &s)
Size += Size operator.
Definition: size.h:99
Size(const Vec2< int > &s)
Definition: size.h:163
Sizef(const Sizex< int > ©)
Definition: size.h:178
2D (width,height) size structure - Integer
Definition: size.h:157
Sizex< Type > & operator-=(const Type &s)
Size -= operator.
Definition: size.h:119
4D vector
Definition: size.h:48
Sizex< Type > & operator+=(const Type &s)
Size += operator.
Definition: size.h:115
2D (width,height) size structure.
Definition: size.h:55
2D (width,height) size structure - Float
Definition: size.h:170
Sizex< Type > & operator/=(const Type &s)
Size /= operator.
Definition: size.h:127