diff --git a/crates/fj-math/src/bivector.rs b/crates/fj-math/src/bivector.rs index a4b70ceda..b5c5788d9 100644 --- a/crates/fj-math/src/bivector.rs +++ b/crates/fj-math/src/bivector.rs @@ -1,4 +1,4 @@ -use crate::Vector; +use crate::{Scalar, Vector}; /// # An n-dimensional bivector /// @@ -27,3 +27,12 @@ pub struct Bivector { /// The second of the vectors whose outer product defines this bivector pub b: Vector, } + +impl Bivector { + /// Compute the magnitude of the bivector + pub fn magnitude(&self) -> Scalar { + self.a.angle_to(&self.b).sin().abs() + * self.a.magnitude() + * self.b.magnitude() + } +}