Skip to content

Commit

Permalink
fix voxel dim calc
Browse files Browse the repository at this point in the history
  • Loading branch information
robtfm committed Sep 10, 2023
1 parent 7155e57 commit 4ea142f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/transformation/voxelization/voxelized_volume.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,12 @@ impl VoxelizedVolume {
}

#[cfg(feature = "dim3")]
if d[0] > d[1] && d[0] > d[2] {
if d[0] >= d[1] && d[0] >= d[2] {
r = d[0];
result.resolution[0] = resolution;
result.resolution[1] = 2 + (resolution as Real * d[1] / d[0]) as u32;
result.resolution[2] = 2 + (resolution as Real * d[2] / d[0]) as u32;
} else if d[1] > d[0] && d[1] > d[2] {
} else if d[1] >= d[0] && d[1] >= d[2] {
r = d[1];
result.resolution[1] = resolution;
result.resolution[0] = 2 + (resolution as Real * d[0] / d[1]) as u32;
Expand Down

0 comments on commit 4ea142f

Please sign in to comment.