20 #ifndef PISM_VECTOR2D_HH
21 #define PISM_VECTOR2D_HH
Vector2d operator+(const Vector2d &other) const
Adds two vectors.
Vector2d operator-(const Vector2d &other) const
Substracts two vectors.
double magnitude() const
Magnitude.
Vector2d & operator*=(const double &a)
Vector2d & operator=(const Vector2d &other)
Vector2d(double a, double b)
Vector2d(const Vector2d &other)
Vector2d & operator+=(const Vector2d &other)
Vector2d & operator=(const double &a)
Set both components to the same number.
Vector2d operator*(const double &a) const
Scales a vector.
Vector2d & operator-=(const Vector2d &other)
Vector2d operator/(const double &a) const
Scales a vector.
Vector2d & operator/=(const double &a)
double magnitude_squared() const
Magnitude squared.
This class represents a 2D vector field (such as ice velocity) at a certain grid point.
Vector2d operator*(const double &a, const Vector2d &v)