mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Run cargo fmt
Former-commit-id: c038eee51ee522fc170f7dcee94c533ad2708df2
This commit is contained in:
parent
647d1dcc9c
commit
b2c2d89447
@ -49,7 +49,7 @@ impl<'a, V: ReadVol, F: RayUntil<V::Vox>> Ray<'a, V, F> {
|
|||||||
|
|
||||||
match self.vol.get(ipos).map(|vox| (vox, (self.until)(vox))) {
|
match self.vol.get(ipos).map(|vox| (vox, (self.until)(vox))) {
|
||||||
Ok((vox, true)) => return (dist, Ok(Some(vox))),
|
Ok((vox, true)) => return (dist, Ok(Some(vox))),
|
||||||
Ok((_, false)) => {},
|
Ok((_, false)) => {}
|
||||||
Err(err) => return (dist, Err(err)),
|
Err(err) => return (dist, Err(err)),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,10 +58,10 @@ impl Camera {
|
|||||||
(d, Ok(Some(_))) => f32::min(d - 1.0, self.dist),
|
(d, Ok(Some(_))) => f32::min(d - 1.0, self.dist),
|
||||||
(_, Ok(None)) => self.dist,
|
(_, Ok(None)) => self.dist,
|
||||||
(_, Err(_)) => self.dist,
|
(_, Err(_)) => self.dist,
|
||||||
}.max(0.0)
|
}
|
||||||
|
.max(0.0)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
let view_mat = Mat4::<f32>::identity()
|
let view_mat = Mat4::<f32>::identity()
|
||||||
* Mat4::translation_3d(-Vec3::unit_z() * dist)
|
* Mat4::translation_3d(-Vec3::unit_z() * dist)
|
||||||
* Mat4::rotation_z(self.ori.z)
|
* Mat4::rotation_z(self.ori.z)
|
||||||
|
Loading…
Reference in New Issue
Block a user