so you can't write code like this :
Code: Select all
vector3df v1 = vector3df(0.0f,0.1f,0.0f);
vector3df v2 = -v1;Code: Select all
vector3d<T> operator-() const { return vector3d<T>(-X, -Y, -Z); }I test it for float and it works OK. And I think it's more interesting than the legacy "invert" method because it doesn't use 3 <T>multiplications but just 3 <T> change of sign.