pub fn commutator(&self, other: &Self) -> Self {
        let self_times_other = self * other;
        let other_times_self = other * self;
        let one_over_two = S::one() / (S::one() + S::one());

        (self_times_other - other_times_self) * one_over_two
    }
/// Compute the commutator of two multivectors.
/// 
/// The commutator of multivectors `mv1` and `mv2` is given by
/// ```text
/// comm(mv1, mv2) := (mv1 * mv2 - mv2 * mv1) / 2
/// ```
/// where `*` denotes the geometric product.
/// 
/// # Example
/// 
/// ```
/// # use cggeomalg::e3ga::{
/// #     EuclideanMultivector3,
/// # };
/// #
/// let mv1 = EuclideanMultivector3::from_scalar(2_f64);
/// let mv2 = EuclideanMultivector3::from_scalar(3_f64);
/// let expected: EuclideanMultivector3<f64> = EuclideanMultivector3::zero();
/// let result = mv1.commutator(&mv2);
/// 
/// assert_eq!(result, expected);
/// ```
Compute the commutator of two multivectors.
Compute the commutator of two multivectors .
pub fn commutator(&self, other: &Self) -> Self {
        let self_times_other = self * other;
        let other_times_self = other * self;
        let one_over_two = S::one() / (S::one() + S::one());
        (self_times_other - other_times_self) * one_over_two
    }
pub fn commutator ( & self , other : & Self ) -> Self { let self_times_other = self * other ; let other_times_self = other * self ; let one_over_two = S :: one ( ) / ( S :: one ( ) + S :: one ( ) ) ; ( self_times_other - other_times_self ) * one_over_two }
Compute the commutator of two multivectors.
Compute the commutator of two multivectors .
&self
other
&Self
example
None
use cggeomalg::e3ga::{
None
euclideanmultivector3,
None
};
let mv1 = EuclideanMultivector3::from_scalar(2_f64);
let mv2 = EuclideanMultivector3::from_scalar(3_f64);
let expected: EuclideanMultivector3 = EuclideanMultivector3::zero();
let result = mv1.commutator(&mv2).

assert_eq!(result, expected);
```
let mv1 = EuclideanMultivector3 :: from_scalar ( 2_f64 ) ; let mv2 = EuclideanMultivector3 :: from_scalar ( 3_f64 ) ; let expected : EuclideanMultivector3 = EuclideanMultivector3 :: zero () ; let result = mv1 . commutator ( &mv2 ) . assert_eq! ( result expected ) ; ` ` `