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

Feature/line equality #119

Merged
merged 5 commits into from
Apr 13, 2021
Merged

Conversation

hyrodium
Copy link
Contributor

This PR fixes #105.

@hyrodium
Copy link
Contributor Author

Here's an example of intransitivity of ==(::Line, ::Line) which is discussed in this comment.

l1 = Line{2, Float64}(Point(0.0, 0.0), Point(1.0, 2.01027582027942e-9))
l2 = Line{2, Float64}(Point(0.0, 0.0), Point(1.0, 0.0))
l3 = Line{2, Float64}(Point(0.0, 0.0), Point(1.0, -1.4337470895339735e-8))

l1 == l2  # true
l2 == l3  # true
l1 == l3  # false

@hyrodium
Copy link
Contributor Author

The ci Julia 1 - macos-latest - x64 - pull_request is failing, but it seems like this PR is not relevant.

Copy link
Member

@juliohm juliohm left a comment

Choose a reason for hiding this comment

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

Amazing PR @hyrodium , thanks for the very nice and clean code. Appreciate if you can take a look at the comments before we merge it. The build failing on MacOS is indeed unrelated.

src/primitives/line.jl Show resolved Hide resolved
src/primitives/line.jl Outdated Show resolved Hide resolved
test/primitives.jl Show resolved Hide resolved
Co-authored-by: Júlio Hoffimann <julio.hoffimann@gmail.com>
@juliohm juliohm merged commit 9597d1e into JuliaGeometry:master Apr 13, 2021
@juliohm
Copy link
Member

juliohm commented Apr 13, 2021

Thanks! Nice to have you around. Looking forward to more thoughtful discussions and improvements.

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.

Implement equality for Line
2 participants