src/vector.h
branchpyrit
changeset 12 f4fcabf05785
parent 0 3547b885df7e
child 14 fc18ac4833f2
equal deleted inserted replaced
11:4d192e13ee84 12:f4fcabf05785
    92 			a.z * b.x - a.x * b.z,
    92 			a.z * b.x - a.x * b.z,
    93 			a.x * b.y - a.y * b.x);
    93 			a.x * b.y - a.y * b.x);
    94 	};
    94 	};
    95 
    95 
    96 	// product of vector and scalar
    96 	// product of vector and scalar
    97 	Vector3 operator*(const float &f)
    97 	friend Vector3 operator*(const Vector3 &v, const float &f)
    98 	{
    98 	{
    99 		return Vector3(f * x, f * y, f * z);
    99 		return Vector3(f * v.x, f * v.y, f * v.z);
   100 	}
   100 	}
   101 
   101 
   102 	friend Vector3 operator*(const float &f, Vector3 &v)
   102 	friend Vector3 operator*(const float &f, Vector3 &v)
   103 	{
   103 	{
   104 		return v * f;
   104 		return v * f;