diff options
Diffstat (limited to 'src/metal.cpp')
| -rw-r--r-- | src/metal.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/metal.cpp b/src/metal.cpp index d02a2f7..196c95d 100644 --- a/src/metal.cpp +++ b/src/metal.cpp @@ -6,7 +6,7 @@ metal::metal(const color& albedo, double f) : albedo(albedo), fuzz(f < 1 ? f : 1) {} bool metal::scatter(const ray& r, const struct hit_info& info, color& attenuation, ray& scattered) const { - auto reflected = reflect(r.direction, info.normal).unit(); + auto reflected = reflect(r.direction.unit(), info.normal); scattered = ray { info.point, reflected + fuzz * random_in_unit_sphere() }; attenuation = albedo; |
