Original Post
Something I have wondered for a long time... 2 overloaded functions:
Vector3 Vector3 :: operator - ()
{
return Vector3 (-x, -y, -z);
};
void Vector3 :: operator - (int)
{
x = -x;
y = -y;
z = -z;
};
The int is only there to provide a unique parameter list for compilation. Does it slow the final code down at all, and is there a better way?