mini_collide/line_segment.rs
1use mini_math::Point;
2
3/// A finite line segment
4#[derive(Debug)]
5pub struct LineSegment {
6 /// The start point of the line segment
7 pub start: Point,
8 /// The end point of the line segment
9 pub end: Point,
10}
11
12impl LineSegment {
13 /// Construct a ray from a starting point and direction
14 pub fn new(start: Point, end: Point) -> Self {
15 Self { start, end }
16 }
17}