Skip to content

Commit

Permalink
Merge pull request #163 from robtfm/fix-voxel-dim-calc
Browse files Browse the repository at this point in the history
Fix voxel dim calc
  • Loading branch information
sebcrozet authored Oct 1, 2023
2 parents 01f6983 + 0a116a9 commit ac33c4a
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 ac33c4a

Please sign in to comment.