Use WHITE and BLACK constants where appropriate

This commit is contained in:
2021-07-17 16:41:22 -07:00
parent b37398ac40
commit 9f00485256
6 changed files with 26 additions and 25 deletions

View File

@@ -7,6 +7,7 @@ use rtchallenge::{
rays::Ray,
spheres::{intersect, Sphere},
tuples::{Color, Tuple},
WHITE,
};
fn main() -> Result<()> {
@@ -28,7 +29,7 @@ fn main() -> Result<()> {
..Material::default()
};
let light_position = Tuple::point(-10., 10., -10.);
let light_color = Color::new(1., 1., 1.);
let light_color = WHITE;
let light = PointLight::new(light_position, light_color);
for y in 0..h {