projects
/
supertux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b5fbc4b
)
Added base_type to vector constructor.
author
Ricardo Cruz
<rick2@aeiou.pt>
Thu, 5 Aug 2004 10:08:43 +0000
(10:08 +0000)
committer
Ricardo Cruz
<rick2@aeiou.pt>
Thu, 5 Aug 2004 10:08:43 +0000
(10:08 +0000)
This way it is possible to just pass the object's base to draw() and other functions that want Vectors.
SVN-Revision: 1704
lib/math/vector.h
patch
|
blob
|
history
diff --git
a/lib/math/vector.h
b/lib/math/vector.h
index
8e8555d
..
90588c8
100644
(file)
--- a/
lib/math/vector.h
+++ b/
lib/math/vector.h
@@
-20,6
+20,8
@@
#ifndef SUPERTUX_VECTOR_H
#define SUPERTUX_VECTOR_H
+#include "special/base.h"
+
namespace SuperTux
{
@@
-34,6
+36,9
@@
namespace SuperTux
Vector(const Vector& other)
: x(other.x), y(other.y)
{ }
+ Vector(const base_type& base)
+ : x(base.x), y(base.y)
+ { }
Vector()
: x(0), y(0)
{ }