Add Plane::from_points

This commit is contained in:
Hanno Braun 2025-01-21 20:16:04 +01:00
parent ef061b4e16
commit d7cf92c597

View File

@ -7,6 +7,14 @@ pub struct Plane {
}
impl Plane {
#[allow(unused)] // code using this is being worked on
pub fn from_points([a, b, c]: [Point<3>; 3]) -> Self {
Self {
origin: a,
coords: Bivector { a: b - a, b: c - a },
}
}
pub fn u(&self) -> Vector<3> {
self.coords.a
}