pmc/vector.cc
changeset 43 cf8c1b5127b2
parent 42 83b8151b966d
child 45 7197576fedcf
--- a/pmc/vector.cc
+++ b/pmc/vector.cc
@@ -37,12 +37,12 @@
     return y;
 }
 
-Vector Vector::operator+ (Vector a)
+Vector Vector::operator+ (Vector& a)
 {
     return Vector (x + a.X (), y + a.Y ());
 }
 
-Vector Vector::operator- (Vector a)
+Vector Vector::operator- (Vector& a)
 {
     return Vector (x - a.X (), y - a.Y ());
 }
@@ -57,7 +57,7 @@
     fprintf (stderr, "(%.3d, %.3d)", x, y);
 }
 
-double Vector::angle (Vector v)
+double Vector::angle (Vector& v)
 {
     if (mode == DEG)
         return ((180.0 / M_PI) * std::acos ((v.X () * X () + v.Y () * Y ()) / (abs () * v.abs ())));