|
@@ -127,12 +127,12 @@ double Vector3D::norm() const
|
127
|
127
|
return sqrt((_x * _x) + (_y * _y) + (_z * _z));
|
128
|
128
|
}
|
129
|
129
|
|
130
|
|
-Vector3D Vector3D::operator+()
|
|
130
|
+Vector3D Vector3D::operator+() const
|
131
|
131
|
{
|
132
|
132
|
return *this;
|
133
|
133
|
}
|
134
|
134
|
|
135
|
|
-Vector3D Vector3D::operator+(const double &k)
|
|
135
|
+Vector3D Vector3D::operator+(const double &k) const
|
136
|
136
|
{
|
137
|
137
|
return Vector3D(*this).add(k);
|
138
|
138
|
}
|
|
@@ -142,7 +142,7 @@ Vector3D &Vector3D::operator+=(const double &k)
|
142
|
142
|
return add(k);
|
143
|
143
|
}
|
144
|
144
|
|
145
|
|
-Vector3D Vector3D::operator+(const Vector3D &other)
|
|
145
|
+Vector3D Vector3D::operator+(const Vector3D &other) const
|
146
|
146
|
{
|
147
|
147
|
return Vector3D(*this).add(other);
|
148
|
148
|
}
|
|
@@ -152,12 +152,12 @@ Vector3D &Vector3D::operator+=(const Vector3D &other)
|
152
|
152
|
return add(other);
|
153
|
153
|
}
|
154
|
154
|
|
155
|
|
-Vector3D Vector3D::operator-()
|
|
155
|
+Vector3D Vector3D::operator-() const
|
156
|
156
|
{
|
157
|
157
|
return Vector3D(-_x, -_y, -_z);
|
158
|
158
|
}
|
159
|
159
|
|
160
|
|
-Vector3D Vector3D::operator-(const double &k)
|
|
160
|
+Vector3D Vector3D::operator-(const double &k) const
|
161
|
161
|
{
|
162
|
162
|
return Vector3D(*this).sub(k);
|
163
|
163
|
}
|
|
@@ -167,7 +167,7 @@ Vector3D &Vector3D::operator-=(const double &k)
|
167
|
167
|
return sub(k);
|
168
|
168
|
}
|
169
|
169
|
|
170
|
|
-Vector3D Vector3D::operator-(const Vector3D &other)
|
|
170
|
+Vector3D Vector3D::operator-(const Vector3D &other) const
|
171
|
171
|
{
|
172
|
172
|
return Vector3D(*this).sub(other);
|
173
|
173
|
}
|
|
@@ -177,7 +177,7 @@ Vector3D &Vector3D::operator-=(const Vector3D &other)
|
177
|
177
|
return sub(other);
|
178
|
178
|
}
|
179
|
179
|
|
180
|
|
-Vector3D Vector3D::operator*(const double &k)
|
|
180
|
+Vector3D Vector3D::operator*(const double &k) const
|
181
|
181
|
{
|
182
|
182
|
return Vector3D(*this).mult(k);
|
183
|
183
|
}
|
|
@@ -187,7 +187,7 @@ Vector3D &Vector3D::operator*=(const double &k)
|
187
|
187
|
return mult(k);
|
188
|
188
|
}
|
189
|
189
|
|
190
|
|
-double Vector3D::operator*(const Vector3D &other)
|
|
190
|
+double Vector3D::operator*(const Vector3D &other) const
|
191
|
191
|
{
|
192
|
192
|
return Vector3D(*this).dotProduct(other);
|
193
|
193
|
}
|
|
@@ -198,7 +198,7 @@ Vector3D &Vector3D::operator*=(const Vector3D &other)
|
198
|
198
|
return *this;
|
199
|
199
|
}
|
200
|
200
|
|
201
|
|
-Vector3D Vector3D::operator/(const double &k)
|
|
201
|
+Vector3D Vector3D::operator/(const double &k) const
|
202
|
202
|
{
|
203
|
203
|
return Vector3D(*this).div(k);
|
204
|
204
|
}
|
|
@@ -208,22 +208,22 @@ Vector3D &Vector3D::operator/=(const double &k)
|
208
|
208
|
return div(k);
|
209
|
209
|
}
|
210
|
210
|
|
211
|
|
-bool Vector3D::operator==(const Vector3D &other)
|
|
211
|
+bool Vector3D::operator==(const Vector3D &other) const
|
212
|
212
|
{
|
213
|
213
|
return equal(other);
|
214
|
214
|
}
|
215
|
215
|
|
216
|
|
-bool Vector3D::operator!=(const Vector3D &other)
|
|
216
|
+bool Vector3D::operator!=(const Vector3D &other) const
|
217
|
217
|
{
|
218
|
218
|
return !equal(other);
|
219
|
219
|
}
|
220
|
220
|
|
221
|
|
-bool Vector3D::operator!()
|
|
221
|
+bool Vector3D::operator!() const
|
222
|
222
|
{
|
223
|
223
|
return isNull();
|
224
|
224
|
}
|
225
|
225
|
|
226
|
|
-Vector3D::operator bool()
|
|
226
|
+Vector3D::operator bool() const
|
227
|
227
|
{
|
228
|
228
|
return !isNull();
|
229
|
229
|
}
|