~ubuntu-branches/ubuntu/maverick/freecad/maverick

« back to all changes in this revision

Viewing changes to src/Base/Vector3D.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Adam C. Powell, IV
  • Date: 2010-01-11 08:48:33 UTC
  • mfrom: (3.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20100111084833-4g9vgdqbkw8u34zb
Tags: 0.9.2646.5-1
* New upstream version (closes: #561696).
* Added swig to Build-Depends (closes: #563523, #563772).
* Removed python-opencv from Build-Depends and Recommends (closes: #560768).

Show diffs side-by-side

added added

removed removed

Lines of Context:
125
125
{
126
126
    x *= fScale;
127
127
    y *= fScale;
128
 
    z *= fScale;        
129
 
    return *this;
130
 
}
131
 
 
132
 
template <class _Precision>
133
 
Vector3<_Precision> Vector3<_Precision>::operator * (_Precision fScale)
134
 
{
135
 
    Vector3<_Precision> temp(*this);
136
 
    temp *= fScale;
137
 
    return temp;
 
128
    z *= fScale;
 
129
    return *this;
 
130
}
 
131
 
 
132
template <class _Precision>
 
133
Vector3<_Precision>& Vector3<_Precision>::operator /= (_Precision fDiv) 
 
134
{
 
135
    x /= fDiv;
 
136
    y /= fDiv;
 
137
    z /= fDiv;
 
138
    return *this;
 
139
}
 
140
 
 
141
template <class _Precision>
 
142
Vector3<_Precision> Vector3<_Precision>::operator * (_Precision fScale) const
 
143
{
 
144
    return Vector3<_Precision>(this->x*fScale,this->y*fScale,this->z*fScale);
 
145
}
 
146
 
 
147
template <class _Precision>
 
148
Vector3<_Precision> Vector3<_Precision>::operator / (_Precision fDiv) const
 
149
{
 
150
    return Vector3<_Precision>(this->x/fDiv,this->y/fDiv,this->z/fDiv);
138
151
}
139
152
 
140
153
template <class _Precision>
153
166
}
154
167
 
155
168
template <class _Precision>
156
 
Vector3<_Precision>& Vector3<_Precision>::operator /  (_Precision fDiv) 
157
 
{
158
 
    x /= fDiv;
159
 
    y /= fDiv;
160
 
    z /= fDiv;
161
 
    return *this;
162
 
}
163
 
 
164
 
template <class _Precision>
165
169
Vector3<_Precision> Vector3<_Precision>::operator %  (const Vector3<_Precision>& rcVct) const
166
170
{
167
171
    Vector3<_Precision> cVctRes;