Skip to content

Commit b32d16b

Browse files
netthiermthh
andcommitted
Fix index calculation in index
Signed-off-by: netthier <[email protected]> Co-authored-by: Matthieu Viry <[email protected]>
1 parent 60a8d77 commit b32d16b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/isoringbuilder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ impl IsoRingBuilder {
166166
}
167167

168168
fn index(&self, point: &Pt) -> usize {
169-
(point.x * 2.0 + point.y * (self.dx as Float + 1.) * 4.) as usize
169+
(point.x as usize) * 2 + (point.y as usize) * (self.dx + 1usize) * 4
170170
}
171171

172172
// Stitchs segments to rings.

0 commit comments

Comments
 (0)