Changeset 161 in flair-src for trunk/lib/FlairCore/src/Vector2D.cpp
- Timestamp:
- Mar 6, 2017, 12:45:57 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairCore/src/Vector2D.cpp
r15 r161 33 33 } 34 34 35 Vector2D &Vector2D::operator+=(const Vector2D &vector) { 36 x += vector.x; 37 y += vector.y; 38 return (*this); 39 } 40 41 Vector2D &Vector2D::operator-=(const Vector2D &vector) { 42 x -= vector.x; 43 y -= vector.y; 44 return (*this); 45 } 46 35 47 Vector2D operator+(const Vector2D &vectorA, const Vector2D &vectorB) { 36 48 return Vector2D(vectorA.x + vectorB.x, vectorA.y + vectorB.y); … … 39 51 Vector2D operator-(const Vector2D &vectorA, const Vector2D &vectorB) { 40 52 return Vector2D(vectorA.x - vectorB.x, vectorA.y - vectorB.y); 53 } 54 55 Vector2D operator-(const Vector2D &vectorA) { 56 return Vector2D(-vectorA.x, -vectorA.y); 41 57 } 42 58
Note:
See TracChangeset
for help on using the changeset viewer.