mirror of
https://github.com/hannobraun/Fornjot
synced 2025-08-10 19:26:07 +00:00
Add Plane::from_points
This commit is contained in:
parent
ef061b4e16
commit
d7cf92c597
@ -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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user