This commit is contained in:
Henry Schimke
2023-03-21 10:16:46 -05:00
parent 2b3ed37924
commit 890fb4901f
4 changed files with 9 additions and 7 deletions

View File

@@ -281,9 +281,7 @@ impl Circle<'_> {
// count left
while {
let point = get_point(self.center, (x, y), rotation);
!self.image.check_in_bounds(point.x as u32, point.y as u32)
&& !self.image.get(point.x as u32, point.y as u32)
&& x > 0
!self.image.check_point_in_bounds(point) && !self.image.get_point(point) && x > 0
} {
x -= 1;
length += 1;
@@ -295,8 +293,7 @@ impl Circle<'_> {
// count right
while {
let point = get_point(self.center, (x, y), rotation);
!self.image.check_in_bounds(point.x as u32, point.y as u32)
&& !self.image.get(point.x as u32, point.y as u32)
!self.image.check_point_in_bounds(point) && !self.image.get_point(point)
} {
x += 1;
length += 1;