projects
/
sixth-3d.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improved JavaDoc.
[sixth-3d.git]
/
src
/
main
/
java
/
eu
/
svjatoslav
/
sixth
/
e3d
/
geometry
/
Point2D.java
diff --git
a/src/main/java/eu/svjatoslav/sixth/e3d/geometry/Point2D.java
b/src/main/java/eu/svjatoslav/sixth/e3d/geometry/Point2D.java
index
e22808c
..
a82382f
100755
(executable)
--- a/
src/main/java/eu/svjatoslav/sixth/e3d/geometry/Point2D.java
+++ b/
src/main/java/eu/svjatoslav/sixth/e3d/geometry/Point2D.java
@@
-18,14
+18,19
@@
public class Point2D implements Cloneable {
this.y = y;
}
this.y = y;
}
- public Point2D(final Point2D
source
) {
- x =
source
.x;
- y =
source
.y;
+ public Point2D(final Point2D
parent
) {
+ x =
parent
.x;
+ y =
parent
.y;
}
}
- public Point2D add(final Point2D direction) {
- x += direction.x;
- y += direction.y;
+ /**
+ * Add other point to current point.
+ *
+ * @return current point.
+ */
+ public Point2D add(final Point2D otherPoint) {
+ x += otherPoint.x;
+ y += otherPoint.y;
return this;
}
return this;
}
@@
-38,9
+43,9
@@
public class Point2D implements Cloneable {
return new Point2D(this);
}
return new Point2D(this);
}
- public void clone(final Point2D
source
) {
- x =
source
.x;
- y =
source
.y;
+ public void clone(final Point2D
parent
) {
+ x =
parent
.x;
+ y =
parent
.y;
}
public Point2D getMiddle(final Point2D p1, final Point2D p2) {
}
public Point2D getMiddle(final Point2D p1, final Point2D p2) {
@@
-78,9
+83,14
@@
public class Point2D implements Cloneable {
y = (int) y;
}
y = (int) y;
}
- public Point2D subtract(final Point2D point) {
- x -= point.x;
- y -= point.y;
+ /**
+ * Subtract other point from current point.
+ *
+ * @return current point.
+ */
+ public Point2D subtract(final Point2D otherPoint) {
+ x -= otherPoint.x;
+ y -= otherPoint.y;
return this;
}
return this;
}