Skip to content

Commit ac33c4a

Browse files
authored
Merge pull request #163 from robtfm/fix-voxel-dim-calc
Fix voxel dim calc
2 parents 01f6983 + 0a116a9 commit ac33c4a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/transformation/voxelization/voxelized_volume.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,12 @@ impl VoxelizedVolume {
167167
}
168168

169169
#[cfg(feature = "dim3")]
170-
if d[0] > d[1] && d[0] > d[2] {
170+
if d[0] >= d[1] && d[0] >= d[2] {
171171
r = d[0];
172172
result.resolution[0] = resolution;
173173
result.resolution[1] = 2 + (resolution as Real * d[1] / d[0]) as u32;
174174
result.resolution[2] = 2 + (resolution as Real * d[2] / d[0]) as u32;
175-
} else if d[1] > d[0] && d[1] > d[2] {
175+
} else if d[1] >= d[0] && d[1] >= d[2] {
176176
r = d[1];
177177
result.resolution[1] = resolution;
178178
result.resolution[0] = 2 + (resolution as Real * d[0] / d[1]) as u32;

0 commit comments

Comments
 (0)