So I have these two overloaded operators for my Vector class, dot and cross product, I assume you cannot do this, and I should have a cross function instead.
inline T operator *(const Vector3<T> &v)
{
return value[0]*v[0]+value[1]*v[1]+value[2]*v[2];
}
inline Vector3<T> operator *(const Vector3<T> &v)
{
Vector3<T> result;
result[0] = value[1]*v[2] - value[2]*v[1];
result[1] = value[2]*v[0] - value[0]*v[2];
result[2] = value[0]*v[1] - value[1]*v[0];
return result;
}
In the off chance there is a way to do this that would be great, is it at all possible?