Struct shape_core::Triangle
source · pub struct Triangle<T> {
pub a: Point<T>,
pub b: Point<T>,
pub c: Point<T>,
}
Expand description
Fields§
§a: Point<T>
The 1st vertex of the triangle.
b: Point<T>
The 2nd vertex of the triangle.
c: Point<T>
The 3rd vertex of the triangle.
Implementations§
source§impl<T> Triangle<T>where
T: Clone + AddAssign + Real,
impl<T> Triangle<T>where T: Clone + AddAssign + Real,
sourcepub fn is_congruent(&self) -> bool
pub fn is_congruent(&self) -> bool
Returns true if the triangle is equilateral.
sourcepub fn is_isosceles(&self) -> bool
pub fn is_isosceles(&self) -> bool
Returns true if the triangle is equilateral.
sourcepub fn inscribed_circle(&self) -> Circle<T>
pub fn inscribed_circle(&self) -> Circle<T>
Get the inscribed circle of the triangles
sourcepub fn circumscribed_circle(&self) -> Circle<T>
pub fn circumscribed_circle(&self) -> Circle<T>
Get the circumscribed circle of the triangles.
Trait Implementations§
source§impl<T: Float> EuclideanDistance<T, Triangle<T>> for Point<T>
impl<T: Float> EuclideanDistance<T, Triangle<T>> for Point<T>
fn euclidean_distance(&self, rhs: &Triangle<T>) -> T
source§fn euclidean_squared(&self, rhs: &Triangle<T>) -> T
fn euclidean_squared(&self, rhs: &Triangle<T>) -> T
It is especially suitable when only the length needs to be compared Read more