fix: avoid duplicate points in circle generation by adjusting loop range
This commit is contained in:
@@ -109,7 +109,7 @@ impl Reify for BridgeState {
|
|||||||
// Create 3 orthogonal circles (XY, XZ, YZ planes)
|
// Create 3 orthogonal circles (XY, XZ, YZ planes)
|
||||||
for axis in 0..3 {
|
for axis in 0..3 {
|
||||||
let mut points = Vec::new();
|
let mut points = Vec::new();
|
||||||
for i in 0..=segments {
|
for i in 0..segments { // Changed from 0..=segments to avoid duplicate at 0 and segments
|
||||||
let angle = (i as f32 / segments as f32) * std::f32::consts::TAU;
|
let angle = (i as f32 / segments as f32) * std::f32::consts::TAU;
|
||||||
let (sin, cos) = angle.sin_cos();
|
let (sin, cos) = angle.sin_cos();
|
||||||
let point = match axis {
|
let point = match axis {
|
||||||
|
|||||||
Reference in New Issue
Block a user