subtraction
| 50 | |
| 51 | /// subtraction |
| 52 | Vector3d Vector3d::operator-(const Vector3d& other) const { |
| 53 | double newX = x() - other.x(); |
| 54 | double newY = y() - other.y(); |
| 55 | double newZ = z() - other.z(); |
| 56 | return {newX, newY, newZ}; |
| 57 | } |
| 58 | |
| 59 | /// subtraction |
| 60 | Vector3d& Vector3d::operator-=(const Vector3d& other) { |