geomprim2d 0.1.1

2D geometric primitive types
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use super::scalar::Scalar;
use super::Point;

#[derive(Debug, Clone, Copy)]
pub struct Triangle<S: Scalar> {
  pub a: Point<S>,
  pub b: Point<S>,
  pub c: Point<S>,
}

unsafe impl<S: Scalar> Send for Triangle<S> {}

impl<S: Scalar> Triangle<S> {
  pub fn new(a: Point<S>, b: Point<S>, c: Point<S>) -> Self {
    Triangle { a, b, c }
  }
}