Skip to content

Commit 1b98ecf

Browse files
committed
Fix index function in IsoRingBuilder (fix #18)
This fix follows erronous change made in b32d16b will trying toi fix #12.
1 parent 7ce05e5 commit 1b98ecf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/isoringbuilder.rs

+1-1
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 as usize) * 2 + (point.y as usize) * (self.dx + 1usize) * 4
169+
(point.x as f64 * 2.0 + point.y as f64 * ((self.dx + 1) * 4) as f64) as usize
170170
}
171171

172172
// Stitchs segments to rings.

0 commit comments

Comments
 (0)