aboutsummaryrefslogtreecommitdiff
path: root/Week4
diff options
context:
space:
mode:
authorCamil Staps2015-02-26 16:05:54 +0100
committerCamil Staps2015-02-26 16:05:54 +0100
commitbca99208b92d3f0afff63ecfa665a38ed8673b6d (patch)
tree8723bedd73a97a8fadd5f9f358c16d67574971e8 /Week4
parentMerge branch 'master' into camil (diff)
x
Diffstat (limited to 'Week4')
-rw-r--r--Week4/src/oo15loipe/Punt.java (renamed from Week4/src/week4/Punt.java)6
1 files changed, 6 insertions, 0 deletions
diff --git a/Week4/src/week4/Punt.java b/Week4/src/oo15loipe/Punt.java
index daaddd6..1939c45 100644
--- a/Week4/src/week4/Punt.java
+++ b/Week4/src/oo15loipe/Punt.java
@@ -1,3 +1,5 @@
+package oo15loipe;
+
/**
* Een Punt in 2D
* @author pieter koopman
@@ -68,4 +70,8 @@ public class Punt {
public String toString () {
return "(" + x + "," + y + ")";
}
+
+ public Punt add(Punt plus) {
+ return new Punt(x + plus.getX(), y + plus.getY());
+ }
}