From daaf8c8d9ac06b21a6127a6ebb723bdfa7f6b2e7 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Sat, 13 Oct 2012 12:02:04 +0200 Subject: [PATCH] Added stream output operator for Vector2i. --- source/util/Log.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/source/util/Log.h b/source/util/Log.h index b85e500..263ec74 100644 --- a/source/util/Log.h +++ b/source/util/Log.h @@ -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_ */