WTF #1:
Quote:
void Matrix4f::SetX(Vec3f *vec){ matrix[0] = vec->x; matrix[1] = vec->x; matrix[2] = vec->x;}void Matrix4f::SetY(Vec3f *vec){ matrix[4] = vec->x; matrix[5] = vec->x; matrix[6] = vec->x;}void Matrix4f::SetZ(Vec3f *vec){ matrix[8] = vec->x; matrix[9] = vec->x; matrix[10] = vec->x;}
Note: Apparently .cpp doesn't mean "C plus plus" ... it means "Copy and Paste Programming" ...
And, WTF #2:
Quote:
Vec3f &Vec3f::operator-(Vec3f &vec){ Vec3f _vec; _vec.x = x - vec.x; _vec.y = y - vec.y; _vec.z = z - vec.z; return vec;}
And there we have it. Proof that I'm an idiot :)
[lol] I like it.
I've lost count of how many times I've shot myself in the foot copy-n-pasting while programming.
Almost think it'd be a neat feature of any IDE - forcefully block CTRL+C, CTRL+X and CTRL+V [smile]