pub struct Bivector4 {
pub xy: f32,
pub xz: f32,
pub xw: f32,
pub yz: f32,
pub yw: f32,
pub zw: f32,
}Fields§
§xy: f32§xz: f32§xw: f32§yz: f32§yw: f32§zw: f32Implementations§
Source§impl Bivector4
impl Bivector4
pub const ZERO: Self
pub fn new(xy: f32, xz: f32, xw: f32, yz: f32, yw: f32, zw: f32) -> Self
Sourcepub fn basis(i: usize) -> Self
pub fn basis(i: usize) -> Self
Panics if i >= 6; Plane4::unit_bivector is the typed form.
pub fn magnitude_squared(self) -> f32
Sourcepub fn magnitude(self) -> f32
pub fn magnitude(self) -> f32
sqrt(θ₁² + θ₂²) over the invariant planes; the angle only when simple.
pub fn component(self, plane: Plane4) -> f32
pub fn set_component(&mut self, plane: Plane4, value: f32)
Sourcepub fn dot(self, other: Self) -> f32
pub fn dot(self, other: Self) -> f32
Euclidean product of the six coefficients, not the Clifford scalar part.
Sourcepub fn wedge_self_coeff(self) -> f32
pub fn wedge_self_coeff(self) -> f32
Pseudoscalar coefficient of B ∧ B; zero iff B is simple.
pub fn wedge(u: Vec4, v: Vec4) -> Self
Sourcepub fn contract_vec(self, v: Vec4) -> Vec4
pub fn contract_vec(self, v: Vec4) -> Vec4
Left contraction B ⌋ v, the grade-1 part of B·v: e_xy ⌋ e_x = −e_y.
pub fn dual(self) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Bivector4
impl<'de> Deserialize<'de> for Bivector4
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for Bivector4
impl StructuralPartialEq for Bivector4
Auto Trait Implementations§
impl Freeze for Bivector4
impl RefUnwindSafe for Bivector4
impl Send for Bivector4
impl Sync for Bivector4
impl Unpin for Bivector4
impl UnsafeUnpin for Bivector4
impl UnwindSafe for Bivector4
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more