Debian Codegraph @

src/line_segment.rs

raw symbols SCIP
1 // pathfinder/geometry/src/basic/line_segment.rs
2 //
3 // Copyright © 2019 The Pathfinder Project Developers.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11 //! Line segment types, optimized with SIMD.
12
13 use craterust-analyzer cargo pathfinder_geometry 0.5.1 crate/::transform2drust-analyzer cargo pathfinder_geometry 0.5.1 transform2d/::Matrix2x2Frust-analyzer cargo pathfinder_geometry 0.5.1 transform2d/Matrix2x2F#;
14 use craterust-analyzer cargo pathfinder_geometry 0.5.1 crate/::vectorrust-analyzer cargo pathfinder_geometry 0.5.1 vector/::{Vector2Frust-analyzer cargo pathfinder_geometry 0.5.1 vector/Vector2F#, vec2frust-analyzer cargo pathfinder_geometry 0.5.1 vector/vec2f().};
15 use craterust-analyzer cargo pathfinder_geometry 0.5.1 crate/::utilrust-analyzer cargo pathfinder_geometry 0.5.1 util/;
16 use pathfinder_simdrust-analyzer cargo pathfinder_simd 0.5.6 crate/::defaultrust-analyzer cargo pathfinder_simd 0.5.6 x86/::F32x4rust-analyzer cargo pathfinder_simd 0.5.6 x86/F32x4#;
17 use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::opsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/::{Addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#, Mulrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#, MulAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/MulAssign#, Subrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#};
18
19 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy:, Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default:)]
20 pub struct LineSegment2Frust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F#(pub F32x4rust-analyzer cargo pathfinder_simd 0.5.6 x86/F32x4#);
21
22 impl LineSegment2Frust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F# {
23 #[inline]
24 pub fn newrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]new().(from: Vector2Frust-analyzer cargo pathfinder_geometry 0.5.1 vector/Vector2F#, to: Vector2Frust-analyzer cargo pathfinder_geometry 0.5.1 vector/Vector2F#) -> LineSegment2Frust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F# {
25 LineSegment2Frust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F#(from.0rust-analyzer cargo pathfinder_geometry 0.5.1 vector/Vector2F#0..concat_xy_xyrust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x2]concat_xy_xy().(to.0rust-analyzer cargo pathfinder_geometry 0.5.1 vector/Vector2F#0.))
26 }
27
28 #[inline]
29 pub fn fromrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]from().(self) -> Vector2Frust-analyzer cargo pathfinder_geometry 0.5.1 vector/Vector2F# {
30 Vector2Frust-analyzer cargo pathfinder_geometry 0.5.1 vector/Vector2F#(self.0rust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F#0..xyrust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x4]xy().())
31 }
32
33 #[inline]
34 pub fn torust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]to().(self) -> Vector2Frust-analyzer cargo pathfinder_geometry 0.5.1 vector/Vector2F# {
35 Vector2Frust-analyzer cargo pathfinder_geometry 0.5.1 vector/Vector2F#(self.0rust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F#0..zwrust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x4]zw().())
36 }
37
38 #[inline]
39 pub fn set_fromrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]set_from().(&mut self, point: Vector2Frust-analyzer cargo pathfinder_geometry 0.5.1 vector/Vector2F#) {
40 self.0rust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F#0. = point.0rust-analyzer cargo pathfinder_geometry 0.5.1 vector/Vector2F#0..to_f32x4rust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x2]to_f32x4().().concat_xy_zwrust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x4]concat_xy_zw().(self.0rust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F#0.)
41 }
42
43 #[inline]
44 pub fn set_torust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]set_to().(&mut self, point: Vector2Frust-analyzer cargo pathfinder_geometry 0.5.1 vector/Vector2F#) {
45 self.0rust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F#0. = self.0rust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F#0..concat_xy_xyrust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x4]concat_xy_xy().(point.0rust-analyzer cargo pathfinder_geometry 0.5.1 vector/Vector2F#0..to_f32x4rust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x2]to_f32x4().())
46 }
47
48 #[allow(clippy::wrong_self_convention)]
49 #[inline]
50 pub fn from_xrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]from_x().(self) -> f32 {
51 self.0rust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F#0.[rust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x4][`Index<usize>`]index().0]rust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x4][`Index<usize>`]index().
52 }
53
54 #[allow(clippy::wrong_self_convention)]
55 #[inline]
56 pub fn from_yrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]from_y().(self) -> f32 {
57 self.0rust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F#0.[rust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x4][`Index<usize>`]index().1]rust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x4][`Index<usize>`]index().
58 }
59
60 #[inline]
61 pub fn to_xrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]to_x().(self) -> f32 {
62 self.0rust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F#0.[rust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x4][`Index<usize>`]index().2]rust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x4][`Index<usize>`]index().
63 }
64
65 #[inline]
66 pub fn to_yrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]to_y().(self) -> f32 {
67 self.0rust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F#0.[rust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x4][`Index<usize>`]index().3]rust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x4][`Index<usize>`]index().
68 }
69
70 #[inline]
71 pub fn set_from_xrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]set_from_x().(&mut self, x: f32) {
72 self.0rust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F#0.[rust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x4][`IndexMut<usize>`]index_mut().0]rust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x4][`IndexMut<usize>`]index_mut(). = x
73 }
74
75 #[inline]
76 pub fn set_from_yrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]set_from_y().(&mut self, y: f32) {
77 self.0rust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F#0.[rust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x4][`IndexMut<usize>`]index_mut().1]rust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x4][`IndexMut<usize>`]index_mut(). = y
78 }
79
80 #[inline]
81 pub fn set_to_xrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]set_to_x().(&mut self, x: f32) {
82 self.0rust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F#0.[rust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x4][`IndexMut<usize>`]index_mut().2]rust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x4][`IndexMut<usize>`]index_mut(). = x
83 }
84
85 #[inline]
86 pub fn set_to_yrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]set_to_y().(&mut self, y: f32) {
87 self.0rust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F#0.[rust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x4][`IndexMut<usize>`]index_mut().3]rust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x4][`IndexMut<usize>`]index_mut(). = y
88 }
89
90 #[inline]
91 pub fn splitrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]split().(self, t: f32) -> (LineSegment2Frust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F#, LineSegment2Frust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F#) {
92 debug_assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/debug_assert!!(t >= 0.0 && t <= 1.0);
93 let (from_from, to_to) = (self.0rust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F#0..xyxyrust-analyzer cargo pathfinder_simd 0.5.6 x86/swizzle_f32x4/impl#[F32x4]xyxy().(), self.0rust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F#0..zwzwrust-analyzer cargo pathfinder_simd 0.5.6 x86/swizzle_f32x4/impl#[F32x4]zwzw().());
94 let d_d = to_to rust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x4][`Sub<Self>`]sub().-rust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x4][`Sub<Self>`]sub(). rust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x4][`Sub<Self>`]sub().from_from;
95 let mid_mid = from_from rust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x4][`Add<Self>`]add().+rust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x4][`Add<Self>`]add(). rust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x4][`Add<Self>`]add().d_d rust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x4][`Mul<Self>`]mul().*rust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x4][`Mul<Self>`]mul(). rust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x4][`Mul<Self>`]mul().F32x4rust-analyzer cargo pathfinder_simd 0.5.6 x86/F32x4#::splatrust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x4]splat().(t);
96 (
97 LineSegment2Frust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F#(from_from.concat_xy_xyrust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x4]concat_xy_xy().(mid_mid)),
98 LineSegment2Frust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F#(mid_mid.concat_xy_xyrust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x4]concat_xy_xy().(to_to)),
99 )
100 }
101
102 // Returns the left segment first, followed by the right segment.
103 #[inline]
104 pub fn split_at_xrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]split_at_x().(self, x: f32) -> (LineSegment2Frust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F#, LineSegment2Frust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F#) {
105 let (min_part, max_part) = self.splitrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]split().(self.solve_t_for_xrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]solve_t_for_x().(x));
106 if min_part.from_xrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]from_x().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f32][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f32][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f32][`PartialOrd<Self>`]lt().max_part.from_xrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]from_x().() {
107 (min_part, max_part)
108 } else {
109 (max_part, min_part)
110 }
111 }
112
113 // Returns the upper segment first, followed by the lower segment.
114 #[inline]
115 pub fn split_at_yrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]split_at_y().(self, y: f32) -> (LineSegment2Frust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F#, LineSegment2Frust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F#) {
116 let (min_part, max_part) = self.splitrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]split().(self.solve_t_for_yrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]solve_t_for_y().(y));
117
118 // Make sure we compare `from_y` and `to_y` to properly handle the case in which one of the
119 // two segments is zero-length.
120 if min_part.from_yrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]from_y().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f32][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f32][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f32][`PartialOrd<Self>`]lt().max_part.to_yrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]to_y().() {
121 (min_part, max_part)
122 } else {
123 (max_part, min_part)
124 }
125 }
126
127 #[inline]
128 pub fn solve_t_for_xrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]solve_t_for_x().(self, x: f32) -> f32 {
129 (x rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Sub<Self>`]sub().self.from_xrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]from_x().()) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Div<Self>`]div().(self.to_xrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]to_x().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Sub<Self>`]sub().self.from_xrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]from_x().())
130 }
131
132 #[inline]
133 pub fn solve_t_for_yrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]solve_t_for_y().(self, y: f32) -> f32 {
134 (y rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Sub<Self>`]sub().self.from_yrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]from_y().()) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Div<Self>`]div().(self.to_yrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]to_y().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Sub<Self>`]sub().self.from_yrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]from_y().())
135 }
136
137 #[inline]
138 pub fn solve_x_for_yrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]solve_x_for_y().(self, y: f32) -> f32 {
139 utilrust-analyzer cargo pathfinder_geometry 0.5.1 util/::lerprust-analyzer cargo pathfinder_geometry 0.5.1 util/lerp().(self.from_xrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]from_x().(), self.to_xrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]to_x().(), self.solve_t_for_yrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]solve_t_for_y().(y))
140 }
141
142 #[inline]
143 pub fn solve_y_for_xrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]solve_y_for_x().(self, x: f32) -> f32 {
144 utilrust-analyzer cargo pathfinder_geometry 0.5.1 util/::lerprust-analyzer cargo pathfinder_geometry 0.5.1 util/lerp().(self.from_yrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]from_y().(), self.to_yrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]to_y().(), self.solve_t_for_xrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]solve_t_for_x().(x))
145 }
146
147 #[inline]
148 pub fn reversedrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]reversed().(self) -> LineSegment2Frust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F# {
149 LineSegment2Frust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F#(self.0rust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F#0..zwxyrust-analyzer cargo pathfinder_simd 0.5.6 x86/swizzle_f32x4/impl#[F32x4]zwxy().())
150 }
151
152 #[inline]
153 pub fn upper_pointrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]upper_point().(self) -> Vector2Frust-analyzer cargo pathfinder_geometry 0.5.1 vector/Vector2F# {
154 if self.from_yrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]from_y().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f32][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f32][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f32][`PartialOrd<Self>`]lt().self.to_yrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]to_y().() {
155 self.fromrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]from().()
156 } else {
157 self.torust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]to().()
158 }
159 }
160
161 #[inline]
162 pub fn min_xrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]min_x().(self) -> f32 {
163 f32::minrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f32/impl#[f32]min().(self.from_xrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]from_x().(), self.to_xrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]to_x().())
164 }
165
166 #[inline]
167 pub fn max_xrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]max_x().(self) -> f32 {
168 f32::maxrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f32/impl#[f32]max().(self.from_xrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]from_x().(), self.to_xrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]to_x().())
169 }
170
171 #[inline]
172 pub fn min_yrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]min_y().(self) -> f32 {
173 f32::minrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f32/impl#[f32]min().(self.from_yrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]from_y().(), self.to_yrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]to_y().())
174 }
175
176 #[inline]
177 pub fn max_yrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]max_y().(self) -> f32 {
178 f32::maxrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f32/impl#[f32]max().(self.from_yrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]from_y().(), self.to_yrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]to_y().())
179 }
180
181 #[inline]
182 pub fn y_windingrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]y_winding().(self) -> i32 {
183 if self.from_yrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]from_y().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f32][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f32][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f32][`PartialOrd<Self>`]lt().self.to_yrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]to_y().() {
184 1
185 } else {
186 -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][Neg]neg().1
187 }
188 }
189
190 // Reverses if necessary so that the from point is above the to point. Calling this method
191 // again will undo the transformation.
192 #[inline]
193 pub fn orientrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]orient().(self, y_winding: i32) -> LineSegment2Frust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F# {
194 if y_winding rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]ge().0 {
195 self
196 } else {
197 self.reversedrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]reversed().()
198 }
199 }
200
201 // TODO(pcwalton): Optimize with SIMD.
202 #[inline]
203 pub fn square_lengthrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]square_length().(self) -> f32 {
204 let (dx, dy) = (self.to_xrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]to_x().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Sub<Self>`]sub().self.from_xrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]from_x().(), self.to_yrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]to_y().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Sub<Self>`]sub().self.from_yrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]from_y().());
205 dx rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Mul<Self>`]mul().dx rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Add<Self>`]add().dy rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Mul<Self>`]mul().dy
206 }
207
208 #[inline]
209 pub fn vectorrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]vector().(self) -> Vector2Frust-analyzer cargo pathfinder_geometry 0.5.1 vector/Vector2F# {
210 self.torust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]to().() rust-analyzer cargo pathfinder_geometry 0.5.1 vector/impl#[Vector2F][`Sub<Self>`]sub().-rust-analyzer cargo pathfinder_geometry 0.5.1 vector/impl#[Vector2F][`Sub<Self>`]sub(). rust-analyzer cargo pathfinder_geometry 0.5.1 vector/impl#[Vector2F][`Sub<Self>`]sub().self.fromrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]from().()
211 }
212
213 // http://www.cs.swan.ac.uk/~cssimon/line_intersection.html
214 pub fn intersection_trust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]intersection_t().(self, other: LineSegment2Frust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F#) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<f32> {
215 let p0p1 = self.vectorrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]vector().();
216 let matrix = Matrix2x2Frust-analyzer cargo pathfinder_geometry 0.5.1 transform2d/Matrix2x2F#(other.vectorrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]vector().().0rust-analyzer cargo pathfinder_geometry 0.5.1 vector/Vector2F#0..concat_xy_xyrust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x2]concat_xy_xy().((-rust-analyzer cargo pathfinder_geometry 0.5.1 vector/impl#[Vector2F][Neg]neg().p0p1).0rust-analyzer cargo pathfinder_geometry 0.5.1 vector/Vector2F#0.));
217 if f32::absrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f32/impl#[f32]abs().(matrix.detrust-analyzer cargo pathfinder_geometry 0.5.1 transform2d/impl#[Matrix2x2F]det().()) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f32][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f32][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f32][`PartialOrd<Self>`]lt().EPSILONrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/EPSILON. {
218 return Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#;
219 }
220 return Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#((matrix.inverserust-analyzer cargo pathfinder_geometry 0.5.1 transform2d/impl#[Matrix2x2F]inverse().() rust-analyzer cargo pathfinder_geometry 0.5.1 transform2d/impl#[Matrix2x2F][`Mul<Vector2F>`]mul().*rust-analyzer cargo pathfinder_geometry 0.5.1 transform2d/impl#[Matrix2x2F][`Mul<Vector2F>`]mul(). rust-analyzer cargo pathfinder_geometry 0.5.1 transform2d/impl#[Matrix2x2F][`Mul<Vector2F>`]mul().(self.fromrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]from().() rust-analyzer cargo pathfinder_geometry 0.5.1 vector/impl#[Vector2F][`Sub<Self>`]sub().-rust-analyzer cargo pathfinder_geometry 0.5.1 vector/impl#[Vector2F][`Sub<Self>`]sub(). rust-analyzer cargo pathfinder_geometry 0.5.1 vector/impl#[Vector2F][`Sub<Self>`]sub().other.fromrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]from().())).yrust-analyzer cargo pathfinder_geometry 0.5.1 vector/impl#[Vector2F]y().());
221
222 const EPSILONrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/EPSILON.: f32 = 0.0001;
223 }
224
225 #[inline]
226 pub fn samplerust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]sample().(self, t: f32) -> Vector2Frust-analyzer cargo pathfinder_geometry 0.5.1 vector/Vector2F# {
227 self.fromrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]from().() rust-analyzer cargo pathfinder_geometry 0.5.1 vector/impl#[Vector2F][`Add<Self>`]add().+rust-analyzer cargo pathfinder_geometry 0.5.1 vector/impl#[Vector2F][`Add<Self>`]add(). rust-analyzer cargo pathfinder_geometry 0.5.1 vector/impl#[Vector2F][`Add<Self>`]add().self.vectorrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]vector().() rust-analyzer cargo pathfinder_geometry 0.5.1 vector/impl#[Vector2F][`Mul<f32>`]mul().*rust-analyzer cargo pathfinder_geometry 0.5.1 vector/impl#[Vector2F][`Mul<f32>`]mul(). rust-analyzer cargo pathfinder_geometry 0.5.1 vector/impl#[Vector2F][`Mul<f32>`]mul().t
228 }
229
230 #[inline]
231 pub fn midpointrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]midpoint().(self) -> Vector2Frust-analyzer cargo pathfinder_geometry 0.5.1 vector/Vector2F# {
232 self.samplerust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]sample().(0.5)
233 }
234
235 #[inline]
236 pub fn offsetrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]offset().(self, distance: f32) -> LineSegment2Frust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F# {
237 if self.is_zero_lengthrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]is_zero_length().() {
238 self
239 } else {
240 self rust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F][`Add<Vector2F>`]add().+rust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F][`Add<Vector2F>`]add(). rust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F][`Add<Vector2F>`]add().self.vectorrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]vector().().yxrust-analyzer cargo pathfinder_geometry 0.5.1 vector/impl#[Vector2F]yx().().normalizerust-analyzer cargo pathfinder_geometry 0.5.1 vector/impl#[Vector2F]normalize().() rust-analyzer cargo pathfinder_geometry 0.5.1 vector/impl#[Vector2F][`Mul<Self>`]mul().*rust-analyzer cargo pathfinder_geometry 0.5.1 vector/impl#[Vector2F][`Mul<Self>`]mul(). rust-analyzer cargo pathfinder_geometry 0.5.1 vector/impl#[Vector2F][`Mul<Self>`]mul().vec2frust-analyzer cargo pathfinder_geometry 0.5.1 vector/vec2f().(-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][Neg]neg().distance, distance)
241 }
242 }
243
244 #[inline]
245 pub fn is_zero_lengthrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]is_zero_length().(self) -> bool {
246 self.vectorrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F]vector().().is_zerorust-analyzer cargo pathfinder_geometry 0.5.1 vector/impl#[Vector2F]is_zero().()
247 }
248 }
249
250 impl Addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#<Vector2Frust-analyzer cargo pathfinder_geometry 0.5.1 vector/Vector2F#> for LineSegment2Frust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F# {
251 type Outputrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F][`Add<Vector2F>`]Output# = LineSegment2Frust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F#;
252 #[inline]
253 fn addrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F][`Add<Vector2F>`]add().(self, point: Vector2Frust-analyzer cargo pathfinder_geometry 0.5.1 vector/Vector2F#) -> LineSegment2Frust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F# {
254 LineSegment2Frust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F#(self.0rust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F#0. rust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x4][`Add<Self>`]add().+rust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x4][`Add<Self>`]add(). rust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x4][`Add<Self>`]add().point.0rust-analyzer cargo pathfinder_geometry 0.5.1 vector/Vector2F#0..to_f32x4rust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x2]to_f32x4().().xyxyrust-analyzer cargo pathfinder_simd 0.5.6 x86/swizzle_f32x4/impl#[F32x4]xyxy().())
255 }
256 }
257
258 impl Subrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#<Vector2Frust-analyzer cargo pathfinder_geometry 0.5.1 vector/Vector2F#> for LineSegment2Frust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F# {
259 type Outputrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F][`Sub<Vector2F>`]Output# = LineSegment2Frust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F#;
260 #[inline]
261 fn subrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F][`Sub<Vector2F>`]sub().(self, point: Vector2Frust-analyzer cargo pathfinder_geometry 0.5.1 vector/Vector2F#) -> LineSegment2Frust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F# {
262 LineSegment2Frust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F#(self.0rust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F#0. rust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x4][`Sub<Self>`]sub().-rust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x4][`Sub<Self>`]sub(). rust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x4][`Sub<Self>`]sub().point.0rust-analyzer cargo pathfinder_geometry 0.5.1 vector/Vector2F#0..to_f32x4rust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x2]to_f32x4().().xyxyrust-analyzer cargo pathfinder_simd 0.5.6 x86/swizzle_f32x4/impl#[F32x4]xyxy().())
263 }
264 }
265
266 impl Mulrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#<Vector2Frust-analyzer cargo pathfinder_geometry 0.5.1 vector/Vector2F#> for LineSegment2Frust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F# {
267 type Outputrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F][`Mul<Vector2F>`]Output# = LineSegment2Frust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F#;
268 #[inline]
269 fn mulrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F][`Mul<Vector2F>`]mul().(self, factors: Vector2Frust-analyzer cargo pathfinder_geometry 0.5.1 vector/Vector2F#) -> LineSegment2Frust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F# {
270 LineSegment2Frust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F#(self.0rust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F#0. rust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x4][`Mul<Self>`]mul().*rust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x4][`Mul<Self>`]mul(). rust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x4][`Mul<Self>`]mul().factors.0rust-analyzer cargo pathfinder_geometry 0.5.1 vector/Vector2F#0..to_f32x4rust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x2]to_f32x4().().xyxyrust-analyzer cargo pathfinder_simd 0.5.6 x86/swizzle_f32x4/impl#[F32x4]xyxy().())
271 }
272 }
273
274 impl Mulrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#<f32> for LineSegment2Frust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F# {
275 type Outputrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F][`Mul<f32>`]Output# = LineSegment2Frust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F#;
276 #[inline]
277 fn mulrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F][`Mul<f32>`]mul().(self, factor: f32) -> LineSegment2Frust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F# {
278 LineSegment2Frust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F#(self.0rust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F#0. rust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x4][`Mul<Self>`]mul().*rust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x4][`Mul<Self>`]mul(). rust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x4][`Mul<Self>`]mul().F32x4rust-analyzer cargo pathfinder_simd 0.5.6 x86/F32x4#::splatrust-analyzer cargo pathfinder_simd 0.5.6 x86/impl#[F32x4]splat().(factor))
279 }
280 }
281
282 impl MulAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/MulAssign#<Vector2Frust-analyzer cargo pathfinder_geometry 0.5.1 vector/Vector2F#> for LineSegment2Frust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegment2F# {
283 #[inline]
284 fn mul_assignrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F][`MulAssign<Vector2F>`]mul_assign().(&mut self, factors: Vector2Frust-analyzer cargo pathfinder_geometry 0.5.1 vector/Vector2F#) {
285 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().self = *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().self rust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F][`Mul<Vector2F>`]mul().*rust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F][`Mul<Vector2F>`]mul(). rust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/impl#[LineSegment2F][`Mul<Vector2F>`]mul().factors
286 }
287 }
288
289 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy:, Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default:)]
290 #[repr(C)]
291 pub struct LineSegmentU4rust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegmentU4# {
292 pub fromrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegmentU4#from.: u8,
293 pub torust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegmentU4#to.: u8,
294 }
295
296 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy:, Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default:)]
297 #[repr(C)]
298 pub struct LineSegmentU8rust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegmentU8# {
299 pub from_xrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegmentU8#from_x.: u8,
300 pub from_yrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegmentU8#from_y.: u8,
301 pub to_xrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegmentU8#to_x.: u8,
302 pub to_yrust-analyzer cargo pathfinder_geometry 0.5.1 line_segment/LineSegmentU8#to_y.: u8,
303 }