The function in question to get the radians between two vectors.
float be_Vector::Dot(be_Vector right_operand){ Normalize(); right_operand.Normalize(); return acos(x * right_operand.x) + (y * right_operand.y) + (z * right_operand.z);}
The debugger always shows "right_operand = void" (Even when the function returns correct results!)
The only thing I can think of is a problem when copying the vector from where I call the function into the parameter. The vector class is fairly simple so I didn't think I needed to overload the "=" function.
Here is the class...
class be_Vector{ public: float x; float y; float z; be_Vector(); be_Vector(float x, float y, float z); ...Ommited overloaded *, *=, etc... for space float Magnitude(); float Magnitude_Squared(); void Normalize(); float Dot(be_Vector right_operand); be_Vector Cross(be_Vector &right_operand);};
Here is the location I am calling the function from code that is generating errors...
be_Vector end_cross = end->Get_Cross();be_Vector start_cross = start->Get_Cross();float delta_roll = end_cross.Dot(start_cross);
I made sure in the debugger that end_cross and start_cross are getting valid data and they are both getting their values set correctly. end_cross and start_cross both have values of x=0, y=0, z=1 which means Dot should return 0 but it is returning 2.570796
Sorry for so much information but I really don't know where this problem is coming from.
Thanks in advance!
EDIT: SOLVED
Well I made a stupid mistake in the vector function. I was only doing acos on the two x's multiplied instead of the sum of all dimensions. So the program is at least working right now but the debugger is still saying the right operand is void. Any ideas?