src/math/size.hpp File Reference

#include <iosfwd>

Go to the source code of this file.

Classes

class  Size

Functions

Size operator * (const Size &lhs, int factor)
Size operator * (int factor, const Size &rhs)
Size operator/ (const Size &lhs, int divisor)
Size operator+ (const Size &lhs, const Size &rhs)
Size operator- (const Size &lhs, const Size &rhs)
bool operator== (const Size &lhs, const Size &rhs)
bool operator!= (const Size &lhs, const Size &rhs)
std::ostream & operator<< (std::ostream &s, const Size &size)


Function Documentation

Size operator * ( int  factor,
const Size rhs 
) [inline]

Definition at line 83 of file size.hpp.

References Size::height, and Size::width.

00084 { 
00085   return Size(rhs.width  * factor, 
00086               rhs.height * factor); 
00087 }

Size operator * ( const Size lhs,
int  factor 
) [inline]

Definition at line 77 of file size.hpp.

References Size::height, and Size::width.

00078 { 
00079   return Size(lhs.width  * factor, 
00080               lhs.height * factor); 
00081 }

bool operator!= ( const Size lhs,
const Size rhs 
) [inline]

Definition at line 112 of file size.hpp.

References Size::height, and Size::width.

00113 { 
00114   return (lhs.width != rhs.width) || (lhs.height != rhs.height); 
00115 }

Size operator+ ( const Size lhs,
const Size rhs 
) [inline]

Definition at line 95 of file size.hpp.

References Size::height, and Size::width.

00096 { 
00097   return Size(lhs.width  + rhs.width, 
00098               lhs.height + rhs.height); 
00099 }

Size operator- ( const Size lhs,
const Size rhs 
) [inline]

Definition at line 101 of file size.hpp.

References Size::height, and Size::width.

00102 {
00103   return Size(lhs.width  - rhs.width, 
00104               lhs.height - rhs.height); 
00105 }

Size operator/ ( const Size lhs,
int  divisor 
) [inline]

Definition at line 89 of file size.hpp.

References Size::height, and Size::width.

00090 { 
00091   return Size(lhs.width  / divisor, 
00092               lhs.height / divisor); 
00093 }

std::ostream& operator<< ( std::ostream &  s,
const Size size 
)

Definition at line 29 of file size.cpp.

References Size::height, and Size::width.

00030 {
00031   return s << "Size(" << size.width << ", " << size.height << ")";
00032 }

bool operator== ( const Size lhs,
const Size rhs 
) [inline]

Definition at line 107 of file size.hpp.

References Size::height, and Size::width.

00108 {
00109   return (lhs.width == rhs.width) && (lhs.height == rhs.height); 
00110 }


Generated on Mon Jun 9 03:38:26 2014 for SuperTux by  doxygen 1.5.1