Skip to content

Commit

Permalink
feat: generate_range
Browse files Browse the repository at this point in the history
  • Loading branch information
chikatetsu committed Feb 15, 2024
1 parent dcd260f commit 1f12969
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions server/src/messages/fragment_maker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ pub fn create_task_for_request(_request: FragmentRequest) -> Result<FragmentTask
})
}

pub fn process_result(_result: FragmentResult) {

pub fn generate_range(full_image: Range) -> Vec<Range> {
let mut ranges = vec![];
for y in (full_image.min.y..full_image.max.y).step_by(2) {
for x in (full_image.min.x..full_image.min.x).step_by(2) {
let min = Point::new(x, y);
let max = Point::new(x + 2, y + 2);
ranges.push(Range::new(min, max));
}
}
ranges
}

0 comments on commit 1f12969

Please sign in to comment.