Added stream output operator for Vector2i.
This commit is contained in:
parent
d7013ce63a
commit
daaf8c8d9a
1 changed files with 10 additions and 1 deletions
|
@ -46,7 +46,7 @@
|
||||||
#define LOG_I(str) std::cout << __FILE__ << ":" << __LINE__ << " " << "Info: " << str << std::endl
|
#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&
|
inline std::ostream&
|
||||||
operator<<(std::ostream& os, const Vector2f& vector) {
|
operator<<(std::ostream& os, const Vector2f& vector) {
|
||||||
|
@ -54,4 +54,13 @@ operator<<(std::ostream& os, const Vector2f& vector) {
|
||||||
return os;
|
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_ */
|
#endif /* DG_LOG_H_ */
|
||||||
|
|
Reference in a new issue