B
billq
Hello,
I have the following function which overloads the * sign in order to
multiply a 3 axis vector by a scaler.
public static _3DVector operator * (_3DVector vec, float num)
{
_3DVector v = new _3DVector();
v.X = num * vec.X;
v.Y = num * vec.Y;
v.Z = num * vec.Z;
return v;
}
From the examples I am following this should work but, I get an error
when I try to build the solution which says
One of the parameters of a binary operator must be the containing type.
I do not understand what this means. Any help will be appreciated.
thanks
bill
I have the following function which overloads the * sign in order to
multiply a 3 axis vector by a scaler.
public static _3DVector operator * (_3DVector vec, float num)
{
_3DVector v = new _3DVector();
v.X = num * vec.X;
v.Y = num * vec.Y;
v.Z = num * vec.Z;
return v;
}
From the examples I am following this should work but, I get an error
when I try to build the solution which says
One of the parameters of a binary operator must be the containing type.
I do not understand what this means. Any help will be appreciated.
thanks
bill