cross product with another Vector3d
| 149 | |
| 150 | /// cross product with another Vector3d |
| 151 | Vector3d Vector3d::cross(const Vector3d& other) const { |
| 152 | double newX = (y() * other.z() - z() * other.y()); |
| 153 | double newY = (z() * other.x() - x() * other.z()); |
| 154 | double newZ = (x() * other.y() - y() * other.x()); |
| 155 | return {newX, newY, newZ}; |
| 156 | } |
| 157 | |
| 158 | /// get the Vector directly |
| 159 | Vector Vector3d::vector() const { |
no test coverage detected