[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] r3254 - trunk/pingus/src/math
From: |
grumbel at BerliOS |
Subject: |
[Pingus-CVS] r3254 - trunk/pingus/src/math |
Date: |
Fri, 28 Sep 2007 23:29:03 +0200 |
Author: grumbel
Date: 2007-09-28 23:29:03 +0200 (Fri, 28 Sep 2007)
New Revision: 3254
Modified:
trunk/pingus/src/math/rect.cpp
trunk/pingus/src/math/rect.hpp
Log:
- added ostream support
Modified: trunk/pingus/src/math/rect.cpp
===================================================================
--- trunk/pingus/src/math/rect.cpp 2007-09-28 13:43:40 UTC (rev 3253)
+++ trunk/pingus/src/math/rect.cpp 2007-09-28 21:29:03 UTC (rev 3254)
@@ -29,7 +29,7 @@
#include <cmath>
-
+#include <iostream>
#include "rect.hpp"
#define cl_min(a,b) ((a < b) ? a : b)
@@ -62,3 +62,10 @@
angle);
}
+std::ostream& operator<<(std::ostream& s, const Rect& rect)
+{
+ return s << "rect[" << rect.left << ", " << rect.top << ", "
+ << rect.right << ", " << rect.bottom << "]";
+}
+
+/* EOF */
Modified: trunk/pingus/src/math/rect.hpp
===================================================================
--- trunk/pingus/src/math/rect.hpp 2007-09-28 13:43:40 UTC (rev 3253)
+++ trunk/pingus/src/math/rect.hpp 2007-09-28 21:29:03 UTC (rev 3254)
@@ -30,6 +30,7 @@
#ifndef __MATH_RECT_HPP__
#define __MATH_RECT_HPP__
+#include <iosfwd>
#include "origin.hpp"
#include "vector3f.hpp"
#include "size.hpp"
@@ -378,5 +379,7 @@
bottom(static_cast<int>(rect.bottom))
{}
+std::ostream& operator<<(std::ostream& s, const Rect& r);
+
#endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] r3254 - trunk/pingus/src/math,
grumbel at BerliOS <=