User Profile
Collapse
-
hahaha omg that was it??? lol, i feel like such an idoit now. Thanks man. (ya it was the const thing. the * operator was defined, thought i had included it in the first post. sorry. -
ya, here is the code
const float operator !() const
{
return sqrtf(X*X + Y*Y + Z*Z);
}
const CVector operator |(const float length) const
{
return *this * (length/ !(*this));
}Leave a comment:
-
assignment operator trouble.
So i have this class CVector which looks a little like this
class CVector
{
const CVector& operator=(const CVector& right)
{
X = right.X;
Y = right.Y;
Z = right.Z;
return *this;
}
const CVector& operator |=(const float length) const
{
return *this = ( *this | length...
No activity results to display
Show More
Leave a comment: