Skip to content

Commit fb2072d

Browse files
authored
Merge pull request #375 from RayTracing/groom-vec3
Remove unnecessary vec3 class qualifiers
2 parents 27dd28b + 2a4188c commit fb2072d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

books/RayTracingInOneWeekend.html

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,6 @@
209209

210210
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++
211211
#include <iostream>
212-
#include <cmath>
213212

214213
class vec3 {
215214
public:
@@ -224,21 +223,21 @@
224223
double operator[](int i) const { return e[i]; }
225224
double& operator[](int i) { return e[i]; }
226225

227-
vec3& vec3::operator+=(const vec3 &v) {
226+
vec3& operator+=(const vec3 &v) {
228227
e[0] += v.e[0];
229228
e[1] += v.e[1];
230229
e[2] += v.e[2];
231230
return *this;
232231
}
233232

234-
vec3& vec3::operator*=(const double t) {
233+
vec3& operator*=(const double t) {
235234
e[0] *= t;
236235
e[1] *= t;
237236
e[2] *= t;
238237
return *this;
239238
}
240239

241-
vec3& vec3::operator/=(const double t) {
240+
vec3& operator/=(const double t) {
242241
return *this *= 1/t;
243242
}
244243

0 commit comments

Comments
 (0)