logo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
mod convert;
use super::*;

#[derive(Debug, Clone)]
pub struct Triangle<T> {
    pub vertex: [Point<T>; 3],
}

impl<T> Triangle<T> {
    pub fn new<P>(vertex: [P; 3]) -> Self
    where
        Point<T>: From<P>,
    {
        let [a, b, c] = vertex;
        Self { vertex: [a.into(), b.into(), c.into()] }
    }
    pub fn is_empty(&self) -> bool {
        true
    }
    pub fn is_sss(&self) -> bool {
        true
    }
    pub fn is_sas(&self) -> bool {
        true
    }
    pub fn area(&self) -> T {
        todo!()
    }
}