Skip to content

Commit

Permalink
remove methods defined in Base
Browse files Browse the repository at this point in the history
  • Loading branch information
hyrodium committed Apr 13, 2024
1 parent 6c271e9 commit 25afb04
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 @@ -150,13 +150,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 25afb04

Please sign in to comment.