Skip to content

Commit

Permalink
Merge pull request #312 from hyrodium/fix/remove_unnecessary_methods
Browse files Browse the repository at this point in the history
Remove unnecessary methods defined in Base
  • Loading branch information
cormullion authored Apr 15, 2024
2 parents 25d6333 + 25afb04 commit a5a4df5
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/point.jl
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,9 @@ function Base.isapprox(p1::Point, p2::Point;
end

isless(p1::Point, p2::Point) = (p1.x < p2.x || (isapprox(p1.x, p2.x) && p1.y < p2.y))
!=(p1::Point, p2::Point) = !isequal(p1, p2)
<(p1::Point, p2::Point) = isless(p1, p2)
>(p1::Point, p2::Point) = p2 < p1
==(p1::Point, p2::Point) = isequal(p1, p2)

cmp(p1::Point, p2::Point) = (p1 < p2) ? -1 : (p2 < p1) ? 1 : 0

# a unique that works better on points?
# I think this uses ==
# TODO perhaps unique(x -> round(x, sigdigits=13), myarray) ?
Expand Down

0 comments on commit a5a4df5

Please sign in to comment.