Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A bunch of the new circle methods either work incorrectly or are inaccurate to the docs descriptions.
Fixed
circle_intersect_line?
and added ability to useanchor_(x|y)
.rect_to_circle
would either return the input object if aradius
property exists or a new hash with{x:, y:, radius: }
, neither of which are what the docs says it should return which is a rectangle. But that's also counterintuitive to the method name so I changed it to always return a new hash with{x:, y:, w:, h:, radius: }
for consistency. I also removed the necessity foranchor_(x|y)
with inputs without aradius
while allowing any input to useanchor_(x|y)
.To be honest, I just didn't know why
rect?
andcircle?
require truthy values for Hash inputs but only needrespond_to?
to be true for non Hash inputs and it bothered me so I simplified them.Fixed
intersect_circle?
and removed the necessity foranchor_(x|y)
with inputs without aradius
while allowing any input to useanchor_(x|y)
.