aboutsummaryrefslogtreecommitdiff
path: root/src/vec3.rs
diff options
context:
space:
mode:
authorlamp2024-01-21 17:03:07 +0000
committerlamp2024-01-21 17:03:07 +0000
commit45fafbcd4b41a5388ece377c4e051b5846407288 (patch)
tree2192c471ca3b47671f0906e27f6f6088f40b3d8a /src/vec3.rs
parent89a5c9a8a0cdf627cda0e31da454f83ca21315ce (diff)
fmt and tidy
Diffstat (limited to 'src/vec3.rs')
-rw-r--r--src/vec3.rs8
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,