From 9d44f7ab04e6f6979e0eebc24f8fb439a23a3865 Mon Sep 17 00:00:00 2001 From: Sakarias Johansson Date: Thu, 12 Jan 2023 22:07:57 +0100 Subject: =?UTF-8?q?=F0=9F=A7=B9=20Minor=20cleanup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Made the traits into supertraits so we don't have to mention Send and Sync everywhere. - Add methods for Vec3 that modifies the existing Vector. Can be used to make less copies. --- racer-tracer/src/geometry/sphere.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'racer-tracer/src/geometry/sphere.rs') diff --git a/racer-tracer/src/geometry/sphere.rs b/racer-tracer/src/geometry/sphere.rs index 256abec..81b621c 100644 --- a/racer-tracer/src/geometry/sphere.rs +++ b/racer-tracer/src/geometry/sphere.rs @@ -9,11 +9,11 @@ use crate::vec3::Vec3; pub struct Sphere { pos: Vec3, radius: f64, - material: Arc>, // Just a color for now. + material: Arc>, } impl Sphere { - pub fn new(pos: Vec3, radius: f64, material: Arc>) -> Self { + pub fn new(pos: Vec3, radius: f64, material: Arc>) -> Self { Self { pos, radius, -- cgit v1.2.3