| 121 | } |
| 122 | |
| 123 | [[nodiscard]] Vector cross( const Vector &other ) const |
| 124 | { |
| 125 | static_assert( |
| 126 | dimension == 3, "Cross product only possible in 3D" ); |
| 127 | return Vector{ { this->value( 1 ) * other.value( 2 ) |
| 128 | - this->value( 2 ) * other.value( 1 ), |
| 129 | this->value( 2 ) * other.value( 0 ) |
| 130 | - this->value( 0 ) * other.value( 2 ), |
| 131 | this->value( 0 ) * other.value( 1 ) |
| 132 | - this->value( 1 ) * other.value( 0 ) } }; |
| 133 | } |
| 134 | |
| 135 | [[nodiscard]] geode::local_index_t most_meaningful_axis() const |
| 136 | { |