Struct shape_core::Line
source · #[repr(C)]pub struct Line<T> {
pub s: Point<T>,
pub e: Point<T>,
}
Expand description
A lines segment of finite length, determined by a starting points and an ending points.
Fields§
§s: Point<T>
Start points of the lines segment.
e: Point<T>
End points of the lines 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