Struct shape_core::Line
source · pub struct Line<T> {
pub s: Point<T>,
pub e: Point<T>,
}Expand description
A line_like segment of finite length, determined by a starting point and an ending point.
Fields§
§s: Point<T>Start point of the line_like segment.
e: Point<T>End point of the line_like segment.
Implementations§
Trait Implementations§
source§impl<'de, T> Deserialize<'de> for Line<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for Line<T>where T: Deserialize<'de>,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<T: Float> EuclideanDistance<T, Line<T>> for Point<T>
impl<T: Float> EuclideanDistance<T, Line<T>> for Point<T>
fn euclidean_distance(&self, rhs: &Line<T>) -> T
source§fn euclidean_squared(&self, rhs: &Line<T>) -> T
fn euclidean_squared(&self, rhs: &Line<T>) -> T
It is especially suitable when only the length needs to be compared Read more