Skip to content
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

Line interception #73

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

fabianfiorotto
Copy link

Well ... this is my interception method. Whatever you think I should change just tell me.

assert_equal [Geometry::Point[1,1]], line2.intersection(line1)
assert_equal [Geometry::Point[1,1]], line1.intersection(line2)
end
it "paralells lines shouldn't intercept" do
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be 'intersect' instead of 'intercept'

@bfoz
Copy link
Owner

bfoz commented Dec 20, 2014

Thanks. We're off to a good start. I have a few comments...

  • Can you rebase this and squash it into a single commit?
  • Can we use fewer return statements in Line#intersection?
  • Likewise with 'self'
  • I'm trying to slowly migrate away from using 'assert_equals'-style tests in favor of 'must_equal'
  • Feel free to add blank lines between the example blocks. I'm not sure why I didn't do that originally.

Thanks for taking care of this. It's almost ready to go.

return []
end

if object.vertical? || self.vertical? then
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be an elsif?

@kigster
Copy link

kigster commented May 28, 2017

Any reason this is not yet merged to master? Seems legit to me, and most certainly a useful feature.

I am debating using this library for re-implementation of my laser-cutter gem, since I had to build my own geometry objects, but I'd rather use something more feature rich and well tested.

@bfoz
Copy link
Owner

bfoz commented May 30, 2017

Because I completely forgot about it 😳
I'll try to get to it soon.

Nice gem. Why do I feel like I've heard about it somewhere? Hackaday?
Let me know if you need anything for the integration.

@bfoz bfoz force-pushed the main branch 3 times, most recently from b6f172d to 0a3ca21 Compare March 21, 2024 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants