~mwinter4/maus/ckov-update

« back to all changes in this revision

Viewing changes to src/common_cpp/DataStructure/ThreeVector.hh

  • Committer: Durga Rajaram
  • Date: 2014-01-14 07:07:02 UTC
  • mfrom: (659.1.80 relcand)
  • Revision ID: durga@fnal.gov-20140114070702-2l1fuj1w6rraw7xe
Tags: MAUS-v0.7.6
MAUS-v0.7.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
          ThreeVector(double x = 0.0, double y = 0.0, double z = 0.0)
66
66
      : TVector3(x, y, z) {}
67
67
 
68
 
    /** Assignment operator */
 
68
    /** Assignment operators */
69
69
    inline ThreeVector& operator=(const ThreeVector& vec) {
70
70
        if (this == &vec)
71
71
            return *this;
73
73
        return *this;
74
74
    }
75
75
 
 
76
    inline ThreeVector& operator/=(const double& d) {
 
77
        (*this) *= (1./d);
 
78
        return *this;
 
79
    }
 
80
 
76
81
    /** Destructor - does nothing */
77
82
    virtual ~ThreeVector() {}
78
83
 
105
110
    MAUS_VERSIONED_CLASS_DEF(ThreeVector)
106
111
};
107
112
 
108
 
inline const ThreeVector operator /(const ThreeVector& v, const double& d) {
109
 
    return v*(1./d);
 
113
inline ThreeVector operator/(const ThreeVector& v, const double& d) {
 
114
    return ThreeVector(v) /= d;
110
115
}
111
116
 
112
117
inline bool operator==(const ThreeVector& v1, const ThreeVector& v2) {