Skip to content

Commit

Permalink
Ensures no warnings on comiple for elixir >=1.16 and <1.16
Browse files Browse the repository at this point in the history
  • Loading branch information
pkinney committed Aug 14, 2024
1 parent f29314e commit deff849
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/distance/vincenty.ex
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,7 @@ defmodule Distance.Vincenty do
defp calculate_cos_squared_alpha(sin_alpha), do: 1 - :math.pow(sin_alpha, 2)

@spec calculate_cos2_sigma_m(number(), number(), number(), number()) :: number()
defp calculate_cos2_sigma_m(_, _, _, +0.0), do: 0
defp calculate_cos2_sigma_m(_, _, _, -0.0), do: 0
defp calculate_cos2_sigma_m(_, _, _, cos_squared_alpha) when cos_squared_alpha == 0.0, do: 0

defp calculate_cos2_sigma_m(sin_u1, sin_u2, cos_sigma, cos_squared_alpha) do
cos_sigma - 2 * sin_u1 * sin_u2 / cos_squared_alpha
Expand Down

0 comments on commit deff849

Please sign in to comment.