diff options
Diffstat (limited to 'src/vec3.rs')
-rw-r--r-- | src/vec3.rs | 8 |
1 files changed, 4 insertions, 4 deletions
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::<f64>() -1.0, - y: 2.0 * rand::random::<f64>() -1.0, + x: 2.0 * rand::random::<f64>() - 1.0, + y: 2.0 * rand::random::<f64>() - 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, |