From 2d1a636ebfb11246d1bef288a80f09bad77612be Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 27 Mar 2011 22:06:52 +0300 Subject: Fix regression after adding gcc 4.6 fixes. --- src/vector.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/vector.h') 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; }; /** -- cgit v1.2.3-60-g2f50