src/math/sizef.hpp File Reference

#include <iosfwd>

Go to the source code of this file.

Classes

class  Sizef

Functions

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


Function Documentation

Sizef operator * ( float  factor,
const Sizef rhs 
) [inline]

Definition at line 83 of file sizef.hpp.

References Sizef::height, and Sizef::width.

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

Sizef operator * ( const Sizef lhs,
float  factor 
) [inline]

Definition at line 77 of file sizef.hpp.

References Sizef::height, and Sizef::width.

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

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

Definition at line 112 of file sizef.hpp.

References Sizef::height, and Sizef::width.

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

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

Definition at line 95 of file sizef.hpp.

References Sizef::height, and Sizef::width.

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

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

Definition at line 101 of file sizef.hpp.

References Sizef::height, and Sizef::width.

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

Sizef operator/ ( const Sizef lhs,
float  divisor 
) [inline]

Definition at line 89 of file sizef.hpp.

References Sizef::height, and Sizef::width.

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

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

Definition at line 29 of file sizef.cpp.

References Sizef::height, and Sizef::width.

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

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

Definition at line 107 of file sizef.hpp.

References Sizef::height, and Sizef::width.

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


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