addition
| 34 | |
| 35 | /// addition |
| 36 | Vector3d Vector3d::operator+(const Vector3d& other) const { |
| 37 | double newX = x() + other.x(); |
| 38 | double newY = y() + other.y(); |
| 39 | double newZ = z() + other.z(); |
| 40 | return {newX, newY, newZ}; |
| 41 | } |
| 42 | |
| 43 | /// addition |
| 44 | Vector3d& Vector3d::operator+=(const Vector3d& other) { |