From 45fafbcd4b41a5388ece377c4e051b5846407288 Mon Sep 17 00:00:00 2001 From: lamp Date: Sun, 21 Jan 2024 17:03:07 +0000 Subject: fmt and tidy --- src/vec3.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/vec3.rs') diff --git a/src/vec3.rs b/src/vec3.rs index 8525fdd..e2f253a 100644 --- a/src/vec3.rs +++ b/src/vec3.rs @@ -88,7 +88,7 @@ impl Vec3 { if p.length_squared() < 1.0 { return p; } - }; + } } pub fn random_unit_vector() -> Vec3 { @@ -98,8 +98,8 @@ impl Vec3 { pub fn random_in_unit_disk() -> Vec3 { loop { let p = Vec3 { - x: 2.0 * rand::random::() -1.0, - y: 2.0 * rand::random::() -1.0, + x: 2.0 * rand::random::() - 1.0, + y: 2.0 * rand::random::() - 1.0, z: 0.0, }; if p.length_squared() < 1.0 { @@ -166,7 +166,7 @@ impl<'a> Iterator for Vec3Iterator<'a> { } } -impl_op_ex!(- |a: &Vec3| -> Vec3 { +impl_op_ex!(-|a: &Vec3| -> Vec3 { Vec3 { x: -a.x, y: -a.y, -- cgit v1.2.3