Added stream output operator for Vector2i.

This commit is contained in:
Felix Ableitner 2012-10-13 12:02:04 +02:00
parent d7013ce63a
commit daaf8c8d9a

View file

@ -46,7 +46,7 @@
#define LOG_I(str) std::cout << __FILE__ << ":" << __LINE__ << " " << "Info: " << str << std::endl
/**
* Adds an output operator specalization for Vector2f
* Adds an output operator specalization for Vector2f.
*/
inline std::ostream&
operator<<(std::ostream& os, const Vector2f& vector) {
@ -54,4 +54,13 @@ operator<<(std::ostream& os, const Vector2f& vector) {
return os;
}
/**
* Adds an output operator specalization for Vector2i
*/
inline std::ostream&
operator<<(std::ostream& os, const Vector2i& vector) {
os << "(" << vector.x << ", " << vector.y << ")";
return os;
}
#endif /* DG_LOG_H_ */