Skip to content

Commit ffd889e

Browse files
committed
Changed to inline function
1 parent 501325b commit ffd889e

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/InOneWeekend/hittable.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ struct hit_record {
2323
double t;
2424
bool front_face;
2525

26-
void set_face_normal(const ray& r, const vec3& outward_normal) {
26+
inline void set_face_normal(const ray& r, const vec3& outward_normal) {
2727
front_face = dot(r.direction(), outward_normal) < 0;
2828
normal = front_face ? outward_normal :-outward_normal;
2929
}

src/TheNextWeek/hittable.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ struct hit_record {
3434
double v;
3535
bool front_face;
3636

37-
void set_face_normal(const ray& r, const vec3& outward_normal) {
37+
inline void set_face_normal(const ray& r, const vec3& outward_normal) {
3838
front_face = dot(r.direction(), outward_normal) < 0;
3939
normal = front_face ? outward_normal :-outward_normal;
4040
}

src/TheRestOfYourLife/hittable.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ struct hit_record {
3434
double v;
3535
bool front_face;
3636

37-
void set_face_normal(const ray& r, const vec3& outward_normal) {
37+
inline void set_face_normal(const ray& r, const vec3& outward_normal) {
3838
front_face = dot(r.direction(), outward_normal) < 0;
3939
normal = front_face ? outward_normal :-outward_normal;
4040
}

0 commit comments

Comments
 (0)