mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Reduced scaling size inflation
This commit is contained in:
parent
8e95444d85
commit
f34175a5a8
@ -15,7 +15,7 @@ impl<'a, V: ReadVol> ReadVol for Scaled<'a, V> {
|
||||
#[inline(always)]
|
||||
fn get(&self, pos: Vec3<i32>) -> Result<&Self::Vox, Self::Error> {
|
||||
let pos = pos.map2(self.scale, |e, scale| (e as f32 / scale).trunc() as i32);
|
||||
let search_size = (Vec3::one() / self.scale).map(|e: f32| e.ceil() as i32);
|
||||
let search_size = (Vec3::one() / self.scale).map(|e: f32| e.round() as i32);
|
||||
let range_iter = |x| {
|
||||
std::iter::successors(Some(0), |x| Some(if *x < 0 { -*x } else { -(*x + 1) }))
|
||||
.take(x as usize * 2)
|
||||
|
Loading…
Reference in New Issue
Block a user