Skip to content

Commit ae07a34

Browse files
improve docs for offset_segments_iterator
1 parent 8106dc8 commit ae07a34

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

geo/src/algorithm/offset_curve/offset_segments_iterator.rs

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/// I am trying to get a custom iterator working to replace the
2-
/// [super::slice_itertools::pairwise()] function.
3-
///
4-
/// It is turning out to be very complicated :(
51
///
62
/// My requirements are
73
///
@@ -28,7 +24,7 @@ use super::{
2824
};
2925

3026
/// Bring this into scope to imbue [LineString] with
31-
/// [LineStringOffsetSegmentPairIterable::iter_offset_segment_pairs()]
27+
/// [iter_offset_segment_pairs()]
3228
pub(super) trait LineStringOffsetSegmentPairs<T>
3329
where
3430
T: CoordFloat,
@@ -82,10 +78,8 @@ where
8278
}
8379
}
8480

85-
///
86-
/// The following diagram illustrates the meaning of the struct members.
87-
///
88-
/// - `LineString` `a---b---c` is offset to form
81+
82+
/// - [LineString] `a---b---c` is offset to form
8983
/// - [LineMeasured] `ab_offset` (`a'---b'`) and
9084
/// - [LineMeasured] `bc_offset` (`b'---c'`)
9185
/// - [LineIntersectionResultWithRelationships] `i` is the intersection point.
@@ -110,6 +104,7 @@ where
110104
// this is true for the last result
111105
pub last: bool,
112106

107+
// TODO: seems a,b,c are unused...
113108
pub a: Coord<T>,
114109
pub b: Coord<T>,
115110
pub c: Coord<T>,
@@ -207,12 +202,7 @@ mod test {
207202
.map(|item| match item {
208203
OffsetSegmentsIteratorItem {
209204
ab_offset: Some(LineMeasured { .. }),
210-
bc_offset:
211-
Some(LineMeasured {
212-
line: bc_offset,
213-
length: bc_len,
214-
}),
215-
205+
bc_offset: Some(LineMeasured { .. }),
216206
i: Some(LineIntersectionResultWithRelationships { .. }),
217207
..
218208
} => Some(()),

0 commit comments

Comments
 (0)