| 111 | } |
| 112 | |
| 113 | [[nodiscard]] double dot( const Vector &other ) const |
| 114 | { |
| 115 | double result{ 0 }; |
| 116 | for( const auto i : LRange{ dimension } ) |
| 117 | { |
| 118 | result += this->value( i ) * other.value( i ); |
| 119 | } |
| 120 | return result; |
| 121 | } |
| 122 | |
| 123 | [[nodiscard]] Vector cross( const Vector &other ) const |
| 124 | { |