Skip to content

Commit

Permalink
Fix matching on +0.0 from Erlang/OTP 27+ warnings (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
elfenlaid authored Sep 30, 2024
1 parent 26f9c94 commit b432f35
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/topo/point_ring.ex
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ defmodule Topo.PointRing do
count_crossing(ring, {0, 0})
end

defp count_crossing([{0.0, 0.0} | _], _), do: {:vertex, :vertex}
defp count_crossing([{0, 0} | _], _), do: {:vertex, :vertex}
defp count_crossing([{x, y} | _], _) when x == 0 and y == 0, do: {:vertex, :vertex}

defp count_crossing([a, b | rest], crosses) do
crosses = calc_crosses(a, b, crosses)
Expand Down

0 comments on commit b432f35

Please sign in to comment.