From 9c9db529ed415df1bd0eade51151f9f9a28d1a6b Mon Sep 17 00:00:00 2001 From: mitchellhansen Date: Sat, 5 Dec 2020 00:23:58 -0800 Subject: [PATCH] problem 5 --- src/problem5/lib.rs | 36 ------------------------------------ 1 file changed, 36 deletions(-) diff --git a/src/problem5/lib.rs b/src/problem5/lib.rs index d018ef3..ac37312 100644 --- a/src/problem5/lib.rs +++ b/src/problem5/lib.rs @@ -18,42 +18,6 @@ enum Side { fn split(side: Side, lower: &mut i32, upper: &mut i32) -> Option { match side { -/* Side::Left => { - *upper = ((*upper - *lower + 1) / 2 + *lower); - //println!("{}, {}", *upper, *lower); - if (*upper - *lower).abs() == 1 { - Some(*lower) - } else { - None - } - } - Side::Right => { - *lower = ((*upper - *lower + 1) / 2 + *lower - 1); - //println!("{}, {}", *upper, *lower); - if (*upper - *lower).abs() == 1 { - Some(*upper - 1) - } else { - None - } - } - Side::Front => { - *upper = ((*upper - *lower + 1) / 2 + *lower); - // println!("{}, {}", *upper, *lower); - if (*upper - *lower).abs() == 1 { - Some(*lower) - } else { - None - } - } - Side::Back => { - *lower = ((*upper - *lower + 1) / 2 + *lower); - //println!("{}, {}", *upper, *lower); - if (*upper - *lower).abs() == 1 { - Some(*upper - 1) - } else { - None - } - }*/ Side::Left => { if (*upper - *lower).abs() == 1 { Some(*lower)