Quote:There really is no need to use an entire class for a vector, since it's such a simple type.
Quote:And yeah(at least from what I have learned), for POD types, you don't in general need operator overloading.Have to disagree strongly with these two statements. A vector really isn't a POD, and a fully-featured vector class can be quite complex. There are many reasons to use operator overloading, but I'll just give one example. Which of the following would you rather write/read/debug?
1.
v4.x = v1.x + t * (v3.x - v2.x);
v4.y = v1.y + t * (v3.y - v2.y);
v4.z = v1.z + t * (v3.z - v2.z);
2.
v4 = VectorAdd(v1, VectorScale(t, VectorSub(v3, v2)));
3.
v4 = v1 + t * (v3 - v2);