Skip to content
GitLab
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Georgii Aksenov
2021-pb162-seminar-project
Commits
e9d91a5a
Commit
e9d91a5a
authored
Mar 03, 2021
by
Georgii Aksenov
Browse files
iteration 01 checkstyle fix PascalCase
parent
d54c731e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/cz/muni/fi/pb162/project/geometry/Vertex2D.java
View file @
e9d91a5a
...
...
@@ -5,23 +5,23 @@ package cz.muni.fi.pb162.project.geometry;
* @author Georgii Aksenov <xaksenov@fi.muni.cz>
*/
public
class
Vertex2D
{
private
double
X
=
0
;
private
double
Y
=
0
;
private
double
x
=
0
;
private
double
y
=
0
;
public
double
getX
()
{
return
X
;
return
x
;
}
public
void
setX
(
double
x
)
{
X
=
x
;
this
.
x
=
x
;
}
public
double
getY
()
{
return
Y
;
return
y
;
}
public
void
setY
(
double
y
)
{
Y
=
y
;
this
.
y
=
y
;
}
/**
...
...
@@ -30,7 +30,7 @@ public class Vertex2D {
* @return string representation.
*/
public
String
getInfo
()
{
return
String
.
format
(
"[%.1f, %.1f]"
,
X
,
Y
);
return
String
.
format
(
"[%.1f, %.1f]"
,
x
,
y
);
}
/**
...
...
@@ -39,7 +39,7 @@ public class Vertex2D {
* @return sum of coordinates.
*/
public
double
sumCoordinates
()
{
return
X
+
Y
;
return
x
+
y
;
}
/**
...
...
@@ -48,7 +48,7 @@ public class Vertex2D {
* @param vertex is added to this vertex.
*/
public
void
move
(
Vertex2D
vertex
)
{
X
+=
vertex
.
X
;
Y
+=
vertex
.
Y
;
x
+=
vertex
.
x
;
y
+=
vertex
.
y
;
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment