Replace util ctor's with constants
I don't need functions to create new vectors, I just want a constant that I can clone. The compiler probably does the same thing in both cases, but this is more semantically accurate to that goal.
This commit is contained in:
@@ -141,7 +141,7 @@ impl Material {
|
||||
Vec3::dot(scattered.dir, rec.normal) > 0.0
|
||||
}
|
||||
Material::Dielectric { index_refraction } => {
|
||||
*attenuation = Vec3::ones();
|
||||
*attenuation = Vec3::ONES;
|
||||
let refraction_ratio = if rec.front_face {
|
||||
1.0 / index_refraction
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user