File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -591,6 +591,12 @@ impl<B: Algebra> Multivector<B> {
591591 } ) ;
592592 self
593593 }
594+ /// The one.
595+ #[ must_use]
596+ #[ allow( clippy:: missing_panics_doc) ]
597+ pub fn one ( ) -> Self {
598+ Self :: new ( [ ( Symbol :: NIL , B :: basis ( ) . next ( ) . expect ( "empty basis" ) ) ] )
599+ }
594600 /// The polarity.
595601 ///
596602 /// ```
@@ -599,9 +605,9 @@ impl<B: Algebra> Multivector<B> {
599605 /// assert_eq!(Vee::plane().pol(), Vee::direction().swp());
600606 /// ```
601607 #[ must_use]
602- #[ allow ( clippy :: missing_panics_doc ) ]
608+ #[ inline ]
603609 pub fn pol ( self ) -> Self {
604- self * Self :: new ( [ ( Symbol :: NIL , B :: basis ( ) . next_back ( ) . expect ( "empty basis" ) ) ] )
610+ self * ! Self :: one ( )
605611 }
606612 /// The mixed-grade squared norm (i.e., a Study number).
607613 ///
You can’t perform that action at this time.
0 commit comments