-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New rectangle methods for retrieving edges #197
base: master
Are you sure you want to change the base?
New rectangle methods for retrieving edges #197
Conversation
new DoubleVector(getLeft(), getBottom()) | ||
); | ||
} | ||
|
||
public Iterable<DoubleSegment> getParts() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would use List here
result.add(new DoubleSegment(origin, origin.add(new DoubleVector(0, dimension.y)))); | ||
result.add(new DoubleSegment(origin.add(dimension), origin.add(new DoubleVector(dimension.x, 0)))); | ||
result.add(new DoubleSegment(origin.add(dimension), origin.add(new DoubleVector(0, dimension.y)))); | ||
result.add(getTopEdge()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would use Arrays.asList(..) instead.
public void getParts() { | ||
Iterator<DoubleSegment> edges = RECTANGLE.getParts().iterator(); | ||
|
||
assertEquals(TOP_EDGE, edges.next()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would use something like assertEquals(Arrays.asList(...), edges)
@timzam Could you review it further and merge depending on your opinion of the code. |
No description provided.