src/vector.h
branchpyrit
changeset 12 f4fcabf05785
parent 0 3547b885df7e
child 14 fc18ac4833f2
--- a/src/vector.h	Fri Nov 23 16:14:38 2007 +0100
+++ b/src/vector.h	Sat Nov 24 21:55:41 2007 +0100
@@ -94,9 +94,9 @@
 	};
 
 	// product of vector and scalar
-	Vector3 operator*(const float &f)
+	friend Vector3 operator*(const Vector3 &v, const float &f)
 	{
-		return Vector3(f * x, f * y, f * z);
+		return Vector3(f * v.x, f * v.y, f * v.z);
 	}
 
 	friend Vector3 operator*(const float &f, Vector3 &v)