summaryrefslogtreecommitdiff
path: root/src/renderer.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/renderer.rs')
-rw-r--r--src/renderer.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/renderer.rs b/src/renderer.rs
index 7e46834..3f94437 100644
--- a/src/renderer.rs
+++ b/src/renderer.rs
@@ -16,7 +16,7 @@ fn hit_sphere(center: &Point3, radius: f32, ray: &Ray) -> bool {
let oc = center.sub(&ray.origin);
let a = ray.direction.dot_prod(&ray.direction);
let b = -2.0 * ray.direction.dot_prod(&oc);
- let mut c = oc.dot_prod(&oc) - radius * radius;
+ let c = oc.dot_prod(&oc) - radius * radius;
let discriminant = b * b - 4.0 * a * c;
discriminant >= 0.0
}