From 09c6f61cb640a6ca0269053b0335b284256da708 Mon Sep 17 00:00:00 2001 From: Derick M <58572875+TurtIeSocks@users.noreply.github.com> Date: Fri, 1 Dec 2023 16:16:25 -0500 Subject: [PATCH] fix: remove debug logs and centered --- server/algorithms/src/bootstrap/s2.rs | 12 ++++++++++++ server/algorithms/src/s2.rs | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/server/algorithms/src/bootstrap/s2.rs b/server/algorithms/src/bootstrap/s2.rs index 3279801e..03e2788f 100644 --- a/server/algorithms/src/bootstrap/s2.rs +++ b/server/algorithms/src/bootstrap/s2.rs @@ -176,6 +176,7 @@ impl<'a> BootstrapS2<'a> { cells.0 } else { let origin_low = CellID::from(region.lo()).parent(self.level); + // let origin_low = CellID::from(region.lo()).parent(self.level); let lo = CellID::from(region.lo()) .parent(self.level) .traverse(Dir::S, self.size) @@ -186,6 +187,12 @@ impl<'a> BootstrapS2<'a> { log::error!("origin: {} | lo: {}", origin_low.face(), lo.face()); } let origin_hi = CellID::from(region.hi()).parent(self.level); + // if origin_low == lo { + // log::info!("origin: {} | lo: {}", origin_low.face(), lo.face()); + // } else { + // log::error!("origin: {} | lo: {}", origin_low.face(), lo.face()); + // } + // let origin_hi = CellID::from(region.hi()).parent(self.level); let hi = CellID::from(region.hi()) .parent(self.level) .traverse(Dir::N, self.size) @@ -195,6 +202,11 @@ impl<'a> BootstrapS2<'a> { } else { log::error!("origin: {} | hi: {}", origin_hi.face(), hi.face()); } + // if origin_hi == hi { + // log::info!("origin: {} | hi: {}", origin_hi.face(), hi.face()); + // } else { + // log::error!("origin: {} | hi: {}", origin_hi.face(), hi.face()); + // } let mut cell_grids = vec![]; diff --git a/server/algorithms/src/s2.rs b/server/algorithms/src/s2.rs index df54516f..84319572 100644 --- a/server/algorithms/src/s2.rs +++ b/server/algorithms/src/s2.rs @@ -215,7 +215,7 @@ pub trait BuildGrid { impl BuildGrid for CellID { fn build_grid(&self, size: u8) -> Vec { - let get_to_start = ((size as f32 / 2.).floor() as u8) + 1; + let get_to_start = (size as f32 / 2.).floor() as u8; let mut starting_cell = self .traverse(Dir::W, get_to_start) .traverse(Dir::S, get_to_start);