summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-03-27 22:06:52 +0300
committerAndrei Karas <akaras@inbox.ru>2011-03-27 22:06:52 +0300
commit2d1a636ebfb11246d1bef288a80f09bad77612be (patch)
tree49cf0a883af7ba3f56749aae2e78ad76717e7f2e /src
parentcb12c0948a09e58f6b1d3d2fd0101faa89d19ffb (diff)
downloadplus-2d1a636ebfb11246d1bef288a80f09bad77612be.tar.gz
plus-2d1a636ebfb11246d1bef288a80f09bad77612be.tar.bz2
plus-2d1a636ebfb11246d1bef288a80f09bad77612be.tar.xz
plus-2d1a636ebfb11246d1bef288a80f09bad77612be.zip
Fix regression after adding gcc 4.6 fixes.
Diffstat (limited to 'src')
-rw-r--r--src/vector.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/vector.h b/src/vector.h
index b2e5f136b..87e9c647a 100644
--- a/src/vector.h
+++ b/src/vector.h
@@ -38,15 +38,15 @@ class Vector
* Constructor.
*/
Vector():
- x(0),
- y(0),
- z(0)
+ x(0.0f),
+ y(0.0f),
+ z(0.0f)
{}
/**
* Constructor.
*/
- Vector(int x, int y, int z = 0.0f):
+ Vector(float x, float y, float z = 0.0f):
x(x),
y(y),
z(z)
@@ -67,13 +67,13 @@ class Vector
*/
bool isNull() const
{
- return x == 0 && y == 0 && z == 0;
+ return x == 0.0f && y == 0.0f && z == 0.0f;
}
/**
* Scale vector operator.
*/
- Vector operator*(int c) const
+ Vector operator*(float c) const
{
return Vector(x * c,
y * c,
@@ -83,7 +83,7 @@ class Vector
/**
* In-place scale vector operator.
*/
- Vector &operator*=(int c)
+ Vector &operator*=(float c)
{
x *= c;
y *= c;
@@ -94,7 +94,7 @@ class Vector
/**
* Scale vector operator.
*/
- Vector operator/(int c) const
+ Vector operator/(float c) const
{
return Vector(x / c,
y / c,
@@ -104,7 +104,7 @@ class Vector
/**
* In-place scale vector operator.
*/
- Vector &operator/=(int c)
+ Vector &operator/=(float c)
{
x /= c;
y /= c;
@@ -189,7 +189,7 @@ class Vector
return Vector(x / l, y / l, z / l);
}
- int x, y, z;
+ float x, y, z;
};
/**