StThreeVector : Overloading
Want to model the algebra of 3-vectors.
By overloading the operators:
StThreeVectorD& operator+(const StThreeVectorD& v1, const StThreeVectorD& v2); // also operator-()
StThreeVectorD& operator+=(const StThreeVectorD&);
StThreeVectorD& operator-=(const StThreeVectorD&);
StThreeVectorD a(1,2,3); StThreeVectorD b(1,2,3);
cout << “a + b= ” << a + b << endl;
Needs also overloading of operator<<