fn offsets(&self, offset_distance: f32) -> Vec<DirectionVec> {
        let points = &self.points;
        (1..points.len())
            .map(|i| {
                let v = &points[i] - &points[i - 1];
                v.rotate_orthogonally().set_length(offset_distance)
            })
            .collect()
    }
/// Produces the offset vectors for each line segment for creating a offset
/// polyline. Each offset vector indicates the direction and distance for
/// offsetting the line segment. The offset vector can be mirrored to get
/// the offset to the other side of the polyline segment.
Produces the offset vectors for each line segment for creating a offset
polyline. Each offset vector indicates the direction and distance for
offsetting the line segment. The offset vector can be mirrored to get
the offset to the other side of the polyline segment.
Produces the offset vectors for each line segment for creating a offset polyline . Each offset vector indicates the direction and distance for offsetting the line segment . The offset vector can be mirrored to get the offset to the other side of the polyline segment .
fn offsets(&self, offset_distance: f32) -> Vec<DirectionVec> {
        let points = &self.points;
        (1..points.len())
            .map(|i| {
                let v = &points[i] - &points[i - 1];
                v.rotate_orthogonally().set_length(offset_distance)
            })
            .collect()
    }
fn offsets ( & self , offset_distance : f32 ) -> Vec < DirectionVec > { let points = & self . points ; ( 1 .. points . len ( ) ) . map ( | i | { let v = & points [ i ] - & points [ i - 1 ] ; v . rotate_orthogonally ( ) . set_length ( offset_distance ) } ) . collect ( ) }
Produces the offset vectors for each line segment for creating a offset
polyline.
Produces the offset vectors for each line segment for creating a offset polyline .
&self
offset_distance
f32
&self
offset_distance
f32