Skip to content

Commit

Permalink
Fix index calculation in index
Browse files Browse the repository at this point in the history
Signed-off-by: netthier <[email protected]>
Co-authored-by: Matthieu Viry <[email protected]>
  • Loading branch information
netthier and mthh committed Apr 12, 2024
1 parent 60a8d77 commit b32d16b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/isoringbuilder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ impl IsoRingBuilder {
}

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

// Stitchs segments to rings.
Expand Down

0 comments on commit b32d16b

Please sign in to comment.