Add the transformations stack code.
[TP_POO.git] / TP2 / Point.java
index e949acc413fbe8f4947a04bd1fc3fdc3dc75df9b..049c6a20cb6b116fedc524cfee81843ae1e7f9ee 100644 (file)
@@ -4,6 +4,9 @@ class Point {
     private double y;
 
     Point() {
+        /*
+         *  FIXME: init to (0,0)?
+         */
     }
 
     Point (double x, double y) {
@@ -27,8 +30,9 @@ class Point {
         return y;
     }
 
-    public Point additionner(Point p1) {
-        return new Point(p1.getX() + getX(), p1.getY() + getX());
+    public Point additionner(Point p) {
+        Point pNew = new Point(p.getX() + getX(), p.getY() + getY());
+        return pNew;
     }
 
     public String toString() {